checkbelt
#3

here /checkbelt CMD

Quote:

CMD:checkbelt(playerid, params[])
{
new giveplayerid;
if(sscanf(params, "i", giveplayerid)) return SendClientMessageEx(playerid, COLOR_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.0, playerid, giveplayerid))
{
new string[128];
new stext[4];
if(Seatbelt[giveplayerid] == 0) { stext = "off"; }
else { stext = "on"; }
if(IsABike(GetPlayerVehicleID(playerid)))
{
format(string, sizeof(string), "%s's helmet is currently %s." , GetPlayerNameEx(giveplayerid) , stext);
SendClientMessageEx(playerid,COLOR_WHITE,string);

format(string, sizeof(string), "* %s looks at %s, checking to see if they are wearing a helmet.", GetPlayerNameEx(playerid),GetPlayerNameEx(giveplay erid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
}
else
{
format(string, sizeof(string), "%s's seat belt is currently %s." , GetPlayerNameEx(giveplayerid) , stext);
SendClientMessageEx(playerid,COLOR_WHITE,string);

format(string, sizeof(string), "* %s peers through the window at %s, checking to see if they are wearing a seatbelt.", GetPlayerNameEx(playerid),GetPlayerNameEx(giveplay erid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
}
}
else { SendClientMessageEx(playerid, COLOR_GREY, "You are not around that player!"); }
return 1;
}

Reply


Messages In This Thread
checkbelt - by alexanderjb918 - 04.09.2015, 11:42
Re: checkbelt - by Roberto80 - 04.09.2015, 12:36
Re: checkbelt - by Nour1 - 04.09.2015, 13:27

Forum Jump:


Users browsing this thread: 1 Guest(s)