- KeNz[]Admin GTA
- Mesaje : 30
Data de inscriere : 12/04/2016
Varsta: : 23
FS[Anti Car jacker]
25/4/2016, 20:26
Nume script: Sistem anti furt de masini/motoare
Continut: contine doua comenzi...una /carjack0 si alta /carjack1
Descriere: Acesta este un FS pentru a nu putea fi furate masinile personale.asa cred eu..l-am gasit pe net!
Link download: http://pastebin.com/2MdQChCF
Un mic tutorial: se introduce acest cod:
////ANTI Carjack [FS]///
//By : ViruZZzZ_ChiLLL//
////ANTI Catjack [FS]///
#include
#define COLOR_RED 0xCC0000AA
#define COLOR_BASIC 0x0066FFAA
forward unlock
( playerid,vehicleid ) ;
new locked[ MAX_PLAYERS ]
[ MAX_VEHICLES ] ;
public OnPlayerCommandText
( playerid, cmdtext [])
{
if ( strcmp( cmdtext , "/carjack0" , true )== 0)
{
if( IsPlayerInAnyVehicle
( playerid))
{
new State=GetPlayerState
( playerid);
if( State!= PLAYER_STATE_DRIVER )
{
SendClientMessage
( playerid,COLOR_RED , "ERROR : You must be inside your vehicle!" );
return 1 ;
}
new i;
for ( i= 0 ;i < MAX_PLAYERS;i ++)
{
SetVehicleParamsForPlayer
( GetPlayerVehicleID( playerid), i , 0 , 0 );
}
SendClientMessage (playerid , COLOR_BASIC , "You are now Carjackable!") ;
new Float:pX , Float: pY, Float: pZ;
GetPlayerPos
( playerid,pX ,pY ,pZ );
PlayerPlaySound( playerid, 1058, pX, pY, pZ) ;
locked [playerid ]
[ GetPlayerVehicleID( playerid)] =
0 ;
}
else
{
SendClientMessage (playerid , COLOR_RED , "ERROR : You're not in a vehicle!" ) ;
}
return 1 ;
}
if ( strcmp( cmdtext , "/carjack1" , true )== 0)
{
if( IsPlayerInAnyVehicle
( playerid))
{
new State=GetPlayerState
( playerid);
if( State!= PLAYER_STATE_DRIVER )
{
SendClientMessage
( playerid,COLOR_RED , "ERROR : You must be inside your vehicle!" );
return 1 ;
}
new i;
for ( i= 0 ;i < MAX_PLAYERS;i ++)
{
if( i != playerid)
{
SetVehicleParamsForPlayer
( GetPlayerVehicleID( playerid), i , 0 , 1 );
}
}
SendClientMessage (playerid , COLOR_BASIC , "You are now anti Carjackable!") ;
new Float:pX , Float: pY, Float: pZ;
GetPlayerPos
( playerid,pX ,pY ,pZ );
PlayerPlaySound
( playerid,1056 , pX, pY, pZ) ;
PlayerPlaySound( playerid, 1137, pX, pY, pZ) ;
locked [playerid ]
[ GetPlayerVehicleID( playerid)] =
1 ;
}
else
{
SendClientMessage (playerid , COLOR_RED , "ERROR : You're not in a vehicle!" ) ;
}
return 1 ;
}
return 0 ;
}
////ANTI Carjack [FS]///
//By : ViruZZzZ_ChiLLL//
////ANTI Catjack [FS]///
#include
#define COLOR_RED 0xCC0000AA
#define COLOR_BASIC 0x0066FFAA
forward unlock(playerid,vehicleid);
new locked[MAX_PLAYERS][MAX_VEHICLES];
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmdtext, "/carjack0", true)==0)
{
if(IsPlayerInAnyVehicle(playerid))
{
new State=GetPlayerState(playerid);
if(State!=PLAYER_STATE_DRIVER)
{
SendClientMessage(playerid,COLOR_RED,"ERROR : You must be inside your vehicle!");
return 1;
}
new i;
for(i=0;i {
SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 0);
}
SendClientMessage(playerid, COLOR_BASIC, "You are now Carjackable!");
new Float:pX, Float:pY, Float:pZ;
GetPlayerPos(playerid,pX,pY,pZ);
PlayerPlaySound(playerid, 1058,pX,pY,pZ);
locked[playerid][GetPlayerVehicleID(playerid)] = 0;
}
else
{
SendClientMessage(playerid, COLOR_RED, "ERROR : You're not in a vehicle!");
}
return 1;
}
if (strcmp(cmdtext, "/carjack1", true)==0)
{
if(IsPlayerInAnyVehicle(playerid))
{
new State=GetPlayerState(playerid);
if(State!=PLAYER_STATE_DRIVER)
{
SendClientMessage(playerid,COLOR_RED,"ERROR : You must be inside your vehicle!");
return 1;
}
new i;
for(i=0;i {
if(i != playerid)
{
SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 1);
}
}
SendClientMessage(playerid, COLOR_BASIC, "You are now anti Carjackable!");
new Float:pX, Float:pY, Float:pZ;
GetPlayerPos(playerid,pX,pY,pZ);
PlayerPlaySound(playerid,1056,pX,pY,pZ);
PlayerPlaySound(playerid, 1137,pX,pY,pZ);
locked[playerid][GetPlayerVehicleID(playerid)] = 1;
}
else
{
SendClientMessage(playerid, COLOR_RED, "ERROR : You're not in a vehicle!");
}
return 1;
}
return 0;
}
Continut: contine doua comenzi...una /carjack0 si alta /carjack1
Descriere: Acesta este un FS pentru a nu putea fi furate masinile personale.asa cred eu..l-am gasit pe net!
Link download: http://pastebin.com/2MdQChCF
Un mic tutorial: se introduce acest cod:
////ANTI Carjack [FS]///
//By : ViruZZzZ_ChiLLL//
////ANTI Catjack [FS]///
#include
#define COLOR_RED 0xCC0000AA
#define COLOR_BASIC 0x0066FFAA
forward unlock
( playerid,vehicleid ) ;
new locked[ MAX_PLAYERS ]
[ MAX_VEHICLES ] ;
public OnPlayerCommandText
( playerid, cmdtext [])
{
if ( strcmp( cmdtext , "/carjack0" , true )== 0)
{
if( IsPlayerInAnyVehicle
( playerid))
{
new State=GetPlayerState
( playerid);
if( State!= PLAYER_STATE_DRIVER )
{
SendClientMessage
( playerid,COLOR_RED , "ERROR : You must be inside your vehicle!" );
return 1 ;
}
new i;
for ( i= 0 ;i < MAX_PLAYERS;i ++)
{
SetVehicleParamsForPlayer
( GetPlayerVehicleID( playerid), i , 0 , 0 );
}
SendClientMessage (playerid , COLOR_BASIC , "You are now Carjackable!") ;
new Float:pX , Float: pY, Float: pZ;
GetPlayerPos
( playerid,pX ,pY ,pZ );
PlayerPlaySound( playerid, 1058, pX, pY, pZ) ;
locked [playerid ]
[ GetPlayerVehicleID( playerid)] =
0 ;
}
else
{
SendClientMessage (playerid , COLOR_RED , "ERROR : You're not in a vehicle!" ) ;
}
return 1 ;
}
if ( strcmp( cmdtext , "/carjack1" , true )== 0)
{
if( IsPlayerInAnyVehicle
( playerid))
{
new State=GetPlayerState
( playerid);
if( State!= PLAYER_STATE_DRIVER )
{
SendClientMessage
( playerid,COLOR_RED , "ERROR : You must be inside your vehicle!" );
return 1 ;
}
new i;
for ( i= 0 ;i < MAX_PLAYERS;i ++)
{
if( i != playerid)
{
SetVehicleParamsForPlayer
( GetPlayerVehicleID( playerid), i , 0 , 1 );
}
}
SendClientMessage (playerid , COLOR_BASIC , "You are now anti Carjackable!") ;
new Float:pX , Float: pY, Float: pZ;
GetPlayerPos
( playerid,pX ,pY ,pZ );
PlayerPlaySound
( playerid,1056 , pX, pY, pZ) ;
PlayerPlaySound( playerid, 1137, pX, pY, pZ) ;
locked [playerid ]
[ GetPlayerVehicleID( playerid)] =
1 ;
}
else
{
SendClientMessage (playerid , COLOR_RED , "ERROR : You're not in a vehicle!" ) ;
}
return 1 ;
}
return 0 ;
}
////ANTI Carjack [FS]///
//By : ViruZZzZ_ChiLLL//
////ANTI Catjack [FS]///
#include
#define COLOR_RED 0xCC0000AA
#define COLOR_BASIC 0x0066FFAA
forward unlock(playerid,vehicleid);
new locked[MAX_PLAYERS][MAX_VEHICLES];
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmdtext, "/carjack0", true)==0)
{
if(IsPlayerInAnyVehicle(playerid))
{
new State=GetPlayerState(playerid);
if(State!=PLAYER_STATE_DRIVER)
{
SendClientMessage(playerid,COLOR_RED,"ERROR : You must be inside your vehicle!");
return 1;
}
new i;
for(i=0;i
SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 0);
}
SendClientMessage(playerid, COLOR_BASIC, "You are now Carjackable!");
new Float:pX, Float:pY, Float:pZ;
GetPlayerPos(playerid,pX,pY,pZ);
PlayerPlaySound(playerid, 1058,pX,pY,pZ);
locked[playerid][GetPlayerVehicleID(playerid)] = 0;
}
else
{
SendClientMessage(playerid, COLOR_RED, "ERROR : You're not in a vehicle!");
}
return 1;
}
if (strcmp(cmdtext, "/carjack1", true)==0)
{
if(IsPlayerInAnyVehicle(playerid))
{
new State=GetPlayerState(playerid);
if(State!=PLAYER_STATE_DRIVER)
{
SendClientMessage(playerid,COLOR_RED,"ERROR : You must be inside your vehicle!");
return 1;
}
new i;
for(i=0;i
if(i != playerid)
{
SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 1);
}
}
SendClientMessage(playerid, COLOR_BASIC, "You are now anti Carjackable!");
new Float:pX, Float:pY, Float:pZ;
GetPlayerPos(playerid,pX,pY,pZ);
PlayerPlaySound(playerid,1056,pX,pY,pZ);
PlayerPlaySound(playerid, 1137,pX,pY,pZ);
locked[playerid][GetPlayerVehicleID(playerid)] = 1;
}
else
{
SendClientMessage(playerid, COLOR_RED, "ERROR : You're not in a vehicle!");
}
return 1;
}
return 0;
}
Permisiunile acestui forum:
Nu puteti raspunde la subiectele acestui forum