25.04.2012, 06:07
Quote:
wouldn't the 'You have taken off your seatbelt' and the 'Deal Ordie has taken off his seatbelt' be displayed to the player that sent the command?
|
pawn Код:
command(seatbelt,playerid,params[])
{
#pragma unused params
new string[60];
new playername[24];
GetPlayerName(playerid,playername,24);
if(WearingSeatbelt[playerid])
{
WearingSeatbelt[playerid] = 0;
SendClientMessage(playerid, COLOR_GREY, "You have taken off your seatbelt.");
format(string, sizeof(string), "* %s twists the holder and takes off their seatbelt.",playername);
ProxDetector(20.0, playerid, string,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else if(!WearingSeatbelt[playerid])
{
WearingSeatbelt[playerid] = 1;
SendClientMessage(playerid, COLOR_GREY, "You put your seatbelt on.");
format(string, sizeof(string), "* %s tucks the holder and puts on their seatbelt.",playername);
ProxDetector(20.0, playerid, string,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
//ProxDetector shows the message to the players within the range of 20.0 with the COLOR_PURPLE
}
return 1;
}