25.04.2012, 05:41
Hello Again,
Fair time since i was last scripting and have to catch up again but i am trying to get a command to send a message to the player that typed the command and then another message to the players around that player.
For example,
Deal_Ordie types /seatbelt
Text to Deal_Ordie: You have clipped your seatbelt on.
Text to players around Deal_Ordie: Deal Ordie clipped on his seat belt.
Any Help is Greatly appreciated,
Cheers.
Fair time since i was last scripting and have to catch up again but i am trying to get a command to send a message to the player that typed the command and then another message to the players around that player.
For example,
Deal_Ordie types /seatbelt
Text to Deal_Ordie: You have clipped your seatbelt on.
Text to players around Deal_Ordie: Deal Ordie clipped on his seat belt.
pawn Код:
command(seatbelt,playerid,params[])
{
#pragma unused params
if(WearingSeatbelt[playerid])
{
WearingSeatbelt[playerid] = 0;
SendClientMessage(playerid, COLOR_GREY, "You have taken off your seatbelt.");
}
else if(!WearingSeatbelt[playerid])
{
WearingSeatbelt[playerid] = 1;
SendClientMessage(playerid, COLOR_GREY, "You put your seatbelt on.");
}
return 1;
}
Cheers.