09.12.2014, 02:53
Hey Hello again, i have this problem now, when i use this CMD, the WantedLevel appears but it disappears at time
What could be my mistake?
Quote:
if(strcmp(cmd, "/c", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "{33CCFF}Usar:{FFFFFF} /c [ID] [WantedLevel]"); return 1; } new playa; new wantedlevel; playa = ReturnUser(tmp); tmp = strtok(cmdtext, idx); wantedlevel = strval(tmp); if (PlayerInfo[playerid][pMember] == 1) { if(IsPlayerConnected(playa)) { if(playa != INVALID_PLAYER_ID) { GivePlayerPWantedLevel(playa, wantedlevel); GetPlayerName(playa, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); if(PlayerInfo[playerid][pMember] == 1) format(string, 256, "LSPD: %s le ha dado a %s %d cargos.", sendername,giveplayer,wantedlevel); ABroadCast(COLOR_YELLOW,string,1); } } } else { SendClientMessage(playerid, COLOR_RED, "No eres policia"); } } return 1; } |