09.11.2009, 13:35
hello guys when i make and try my /taze command on my self it crash it and write error '' send error'' or ''dont send''
what should be wrong in this code ?
i hope you can help , ty for any help
what should be wrong in this code ?
Код:
if(strcmp(cmd, "/taze", true) == 0) { tmp = strtok(cmdtext, idx); new playername[MAX_PLAYER_NAME]; GetPlayerName(playerid, playername, MAX_PLAYER_NAME); giveplayerid = strval(tmp); if(gTeam[playerid] == TEAM_COP || TEAM_SHERIFF || TEAM_FBI) if(!strlen(tmp)) { SendClientMessage(playerid,0xFF0000AA, "USAGE: /Taze [Playerid] / [Player Name]"); return 1; } if(!IsPlayerConnected(giveplayerid)) { SendClientMessage(playerid,0xFF0000AA,"Invaild ID!"); return 1; } //if(giveplayerid == playerid) //{ //SendClientMessage(playerid, 0xFF0000AA, "You Can't Taze Your Self!"); //return 1; //} if(GetPlayerWantedLevel(playerid) >= 4 || 5 || 6) { format(string, sizeof(string), "You Have Been Tazed by Officer %s[%d]!",playername,playerid); SendClientMessage(giveplayerid,0x33CCFFAA,string); format(string, sizeof(string), "You Tazed Suspect %s[%d]!",playername,giveplayerid); SendClientMessage(playerid,0x33CCFFAA,string); format(string, sizeof(string), "~r TAZED"); GameTextForPlayer(giveplayerid,string,5000,5); printf("Suspect %s[%d] Has Been Tazed By Officer %s[%d]!",playername,giveplayerid,playername,playerid); } return 1; } return 0; }