03.11.2009, 15:00
guys i am starting to make /ar command but it so damn angry me wooooooooo... i cant belive 
ok the problem is ''If (Isplayerconnected) .... here is the code
i just make a test ''/ar''
for now if i type /ar or /arrest both messages works great but when i join to my server i am ofc ID 0 and i type ''/ar 1'' cuz this id is not connected and it write in chat
''Player Weed 0 Is Not Connected!'' ---> udner this write
''SERVER:Unknown Command''
so it type both messages ... so can anyone help me solve this and mybe fix other things in this code i do wrong ...
i hope you udnerstand me what is my problem
ty for any help

ok the problem is ''If (Isplayerconnected) .... here is the code
Код:
if ((strcmp("/ar", cmd, true) == 0) || (strcmp(cmd, "/arrest", true) == 0)) { new tmp[256]; new playername[MAX_PLAYER_NAME]; GetPlayerName(playerid, playername, MAX_PLAYER_NAME); giveplayerid = strval(tmp); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid,0xFF0000AA, "USAGE: /Ar [Playerid]/[Player Name]"); return 1; } if (!IsPlayerConnected(giveplayerid)) { format(string, sizeof(string), "Player %s[%d] Is Not Connected!", playername,playerid); SendClientMessage(playerid,0xFF0000AA , string); } if (GetPlayerWantedLevel(playerid) <= 3) { SendClientMessage(playerid,0xFF0000AA,"You Can Only Ticket That Player!"); } if (GetPlayerWantedLevel(playerid) > 4) { SendClientMessage(playerid,0x33CCFFAA,"Arested"); } } return 0; }
for now if i type /ar or /arrest both messages works great but when i join to my server i am ofc ID 0 and i type ''/ar 1'' cuz this id is not connected and it write in chat
''Player Weed 0 Is Not Connected!'' ---> udner this write
''SERVER:Unknown Command''
so it type both messages ... so can anyone help me solve this and mybe fix other things in this code i do wrong ...

i hope you udnerstand me what is my problem

ty for any help