02.01.2015, 15:53
PHP код:
#define RED -1
#define ROB -1
#define INFO -1
new pRobbingP[MAX_PLAYERS];
new pizzaRobbed;
new robTimerP[MAX_PLAYERS];
new cp_Pizza;
CMD:robpizza( playerid, params[ ] )
{
if ( pRobbingP[ playerid ] )
return SendClientMessage( playerid, RED, "ERROR:{FFFFFF} You are already robbing Idlewood Pizza" );
//if ( !IsPlayerInDynamicCP( playerid, cp_Pizza) ) return SendClientMessage( playerid, RED, "ERROR:{FFFFFF} You must be in the checkpoint at Idlewood Pizza to use this command!" );
if ( pizzaRobbed )
return SendClientMessage( playerid, RED, "ERROR:{FFFFFF} Idlewood Pizza has been robbed recently, please wait patiently!" );
robTimerP[ playerid ] = SetTimerEx( "robPizza", 30000, false, "i", playerid );
SendClientMessage( playerid, INFO, "[ROBBERY INFO] You have started a robbery, it will last 30 seconds. Do not leave the checkpoint!" );
pRobbingP[ playerid ] = true;
pizzaRobbed = true;
new
szStr[ 128 ],
usrName[ 24 ];
GetPlayerName( playerid, usrName, 24 );
format( szStr, 128, "[ROBBERY] %s has began a robbery at Idlewood Pizza!", usrName );
SendClientMessageToAll( ROB, szStr );
GameTextForPlayer( playerid, "~g~Robbery in process~n~~r~Do not leave the checkpoint!", 30000, 3 );
SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid) +2);
return true;
}
Check if you have placed all the required plugins. streamer etc