05.11.2010, 18:00
I have a command that when player types /piss it says "Player pisses on player". When other player types piss it not says "player pisses on player" wtf? When other player types /piss, only the animation appeal, not the format message.
pawn Код:
dcmd_piss(playerid, params[]){
#pragma unused params
SetPlayerSpecialAction(i, SPECIAL_ACTION_PISSING);
new Float: POS[3];
new player1, playername[MAX_PLAYER_NAME], pissername[MAX_PLAYER_NAME];
GetPlayerPos(player1, POS[0], POS[1], POS[2]);
if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID && player1 != playerid){
if(IsPlayerInRange(player1, 2, 2, POS[0], POS[1], POS[2])){
GetPlayerName(player1, playername, sizeof(playername));
GetPlayerName(playerid,pissername,sizeof(pissername));
new stringS[100];
format(stringS,sizeof(stringS),"* %s pisses on %s.",pissername,playername);
SendClientMessageToAll(COLOR_PINK, stringS);
}
}
return 1;
}