26.11.2011, 09:06
Hey,
Since yesterday i had a bug with IsPlayerConnected.
When i use it, it returns everytime 0.
Example: /givegun
at
it says, everytime i'm not at the server.
I don't do anything at this code, i write it before 4 months.
That problem is at all commands with IsPlayer Connected.
I use SA-MP 0.3c.
MfG
Since yesterday i had a bug with IsPlayerConnected.
When i use it, it returns everytime 0.
Example: /givegun
Код:
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]"); } if(weap > 46) { return SendClientMessage(playerid,COLOR_RED,"Die WaffenID darf hцchstens 46 sein!"); } 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; }
Код:
if(!IsPlayerConnected(pID)) { return SendClientMessage(playerid,COLOR_RED,"Kein Spieler mit angegebener ID Online"); }
I don't do anything at this code, i write it before 4 months.
That problem is at all commands with IsPlayer Connected.
I use SA-MP 0.3c.
MfG