31.07.2008, 21:26
Quote:
Originally Posted by matt2127
im looking for a /c cmd like where when you do /c it only says the message to the people in the car with oyu
|
pawn Код:
if(!strcmp(cmdtext,"/c",true,2))
{
if(cmdtext[2]==0){SendClientMessage(playerid,YOU_PICK_THE_COLOR,"Car chat: /c <text>"); return 1;}
if(!IsPlayerInAnyVehicle(playerid)) {SendClientMessage(playerid,YOU_PICK_THE_COLOR,"You must be in a car to use car chat."); return 1;}
new the_car = GetPlayerVehicleID(playerid);
for(new player=0; player<MAX_PLAYERS; player++)
{
if(IsPlayerConnected(player) && IsPlayerInVehicle(player,the_car)) SendPlayerMessageToPlayer(player,playerid,cmdtext[3]);
}
return 1;
}