IsPlayerConnected don't work
#3

I use 0.3c and works fine.
Also, you have this with pID inside.
pawn Код:
if(!IsPlayerConnected(pID))
Try this.
pawn Код:
dcmd_givegun(playerid,params[])
{
    if(IsPlayerSAdmin(playerid,2))
    {
        new pID, weap,mun;
        if(sscanf(params, "uii",pID,weap,mun)) return SendClientMessage(playerid,COLOR_RED,"Verwende: /givegun [playerid] [Waffenid (Maximal 46)] [Munition]");
        else if(weap > 46) { return SendClientMessage(playerid,COLOR_RED,"Die WaffenID darf hцchstens 46 sein!"); }
        else if(!IsPlayerConnected(pID)) return SendClientMessage(playerid,COLOR_RED,"Kein Spieler mit angegebener ID Online");
        GivePlayerWeapon(pID,weap,mun);
        new str[128];
        format(str,128,"%s hat dir die Waffe %d mit %d Schuss gegeben.",SpielerInfo[playerid][pName],weap,mun);
        SendClientMessage(pID,COLOR_GREEN,str);
        format(str,128,"Du hast %s die Waffe %d mit %d Schuss gegeben.",SpielerInfo[pID][pName],weap,mun);
        SendClientMessage(playerid,COLOR_GREEN,str);
    }
    return 1;
}
Reply


Messages In This Thread
IsPlayerConnected don't work - by Cole_Phelps - 26.11.2011, 09:06
Re: IsPlayerConnected don't work - by Dragony92 - 26.11.2011, 09:11
Re: IsPlayerConnected don't work - by Kostas' - 26.11.2011, 09:11
Re: IsPlayerConnected don't work - by Rob_Maate - 26.11.2011, 09:12
AW: IsPlayerConnected don't work - by Cole_Phelps - 26.11.2011, 09:32
Re: IsPlayerConnected don't work - by Dragony92 - 26.11.2011, 09:45
AW: IsPlayerConnected don't work - by Cole_Phelps - 26.11.2011, 09:50
AW: IsPlayerConnected don't work - by Cole_Phelps - 26.11.2011, 12:42

Forum Jump:


Users browsing this thread: 5 Guest(s)