Command works only for 1 player. WTF?
#5

pawn Код:
dcmd_piss(playerid, params[])
{
    #pragma unused params
    SetPlayerSpecialAction(playerid, SPECIAL_ACTION_PISSING);
    new playername[MAX_PLAYER_NAME], pissername[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pissername,sizeof(pissername));
    new stringS[100];
    new Float: POS[3];
    GetPlayerPos(playerid, POS[0], POS[1], POS[2]);
    for(new i=0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && i != playerid)
        {
            if(IsPlayerInRange(i, 2, 2, POS[0], POS[1], POS[2]))
            {
                GetPlayerName(i, playername, sizeof(playername));
                format(stringS,sizeof(stringS),"* %s pisses on %s.",pissername,playername);
                SendClientMessageToAll(COLOR_PINK, stringS);
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
Command works only for 1 player. WTF? - by ZamaXor - 05.11.2010, 18:00
Re: Command works only for 1 player. WTF? - by The_Moddler - 05.11.2010, 18:02
Re: Command works only for 1 player. WTF? - by ZamaXor - 05.11.2010, 18:05
Re: Command works only for 1 player. WTF? - by ZamaXor - 05.11.2010, 18:45
Re: Command works only for 1 player. WTF? - by MadeMan - 05.11.2010, 20:26

Forum Jump:


Users browsing this thread: 6 Guest(s)