CMD: /checksb
#3

PHP код:
CMD:cb(playeridparams[]) return cmd_checkbelt(playeridparams);
CMD:checkbelt(playeridparams[])
{
    new 
giveplayerid;
    if(
sscanf(params"u"giveplayerid)) return SendClientMessageEx(playeridCOLOR_WHITE"USAGE: /checkbelt [playerid]");
    if(
GetPlayerState(giveplayerid) == PLAYER_STATE_ONFOOT)
    {
        
SendClientMessageEx(playerid,COLOR_GREY,"That player is not in any vehicle!");
        return 
1;
    }
    if (
ProxDetectorS(9.0playeridgiveplayerid))
    {
        new 
string[128];
        new 
stext[4];
        if(
Seatbelt[giveplayerid] == 0) { stext "off"; }
        else { 
stext "on"; }
        if(
IsABike(GetPlayerVehicleID(playerid)))
        {
            
format(stringsizeof(string), "%s's helmet is currently %s." GetPlayerNameEx(giveplayerid) , stext);
            
SendClientMessageEx(playerid,COLOR_WHITE,string);
            
format(stringsizeof(string), "* %s looks at %s, checking to see if they are wearing a helmet."GetPlayerNameEx(playerid),GetPlayerNameEx(giveplayerid));
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
        }
        else
        {
            
format(stringsizeof(string), "%s's seat belt is currently %s." GetPlayerNameEx(giveplayerid) , stext);
            
SendClientMessageEx(playerid,COLOR_WHITE,string);
            
format(stringsizeof(string), "* %s peers through the window at %s, checking to see if they are wearing a seatbelt."GetPlayerNameEx(playerid),GetPlayerNameEx(giveplayerid));
            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
        }
    }
    else { 
SendClientMessageEx(playeridCOLOR_GREY"You are not around that player!"); }
    return 
1;

+rep if helped
Reply


Messages In This Thread
CMD: /checksb - by pln103 - 30.04.2014, 22:44
Re: CMD: /checksb - by Eth - 01.05.2014, 00:16
Re: CMD: /checksb - by GeasyW - 01.05.2014, 00:26
Re: CMD: /checksb - by pln103 - 01.05.2014, 03:16
Re: CMD: /checksb - by Eth - 01.05.2014, 03:20
Re: CMD: /checksb - by pln103 - 01.05.2014, 03:25
Re: CMD: /checksb - by pln103 - 01.05.2014, 04:02
Re: CMD: /checksb - by Eth - 01.05.2014, 06:07
Re: CMD: /checksb - by pln103 - 01.05.2014, 22:20

Forum Jump:


Users browsing this thread: 4 Guest(s)