25.09.2011, 12:16
yea and how i can use strdel! help me man
Код:
if(strcmp(cmd, "/taketag", true) == 0 && PlayerAdminLevel[playerid] >= 1) // Gives a player army { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_ERROR, "USAGE: /taketag (id)"); return 1; } if(!IsNumeric(tmp)) { SendClientMessage(playerid, COLOR_ERROR, "USAGE: /taketag (id) ID Must be a number"); return 1; } giveplayerid = strval(tmp); if(!IsPlayerConnected(giveplayerid)) { format(string, sizeof(string), "ID (%d) is not an active player", giveplayerid); SendClientMessage(playerid, COLOR_ERROR, string); return 1; } if(CanUseTag[giveplayerid] == 0){ format(string, sizeof(string), "ID (%d) is already cant use tag", giveplayerid); SendClientMessage(playerid, COLOR_ERROR, string); return 1; } new sendername[24]; new receivername[24]; GetPlayerName(playerid,sendername, 24); GetPlayerName(giveplayerid,receivername, 24); format(string, sizeof(string), "You Have Taked %s(%d) [Lsrcr] Tag Right",receivername,giveplayerid); SendClientMessage(playerid, COLOR_GREEN, string); format(string, sizeof(string), "Tag Right Has Been Taked Down Form You By Server %s!",AdminRanks[PlayerAdminLevel[playerid]]); SendClientMessage(giveplayerid, COLOR_GREEN, string); format(string, sizeof(string), "Server %s %s(%d) Has Taked %s(%d) [Lsrcr] Tag Right",AdminRanks[PlayerAdminLevel[playerid]],sendername,playerid,receivername,giveplayerid); printf("%s",string); dUserSetINT(PlayerName(giveplayerid)).("canusetag",0); CanUseTag[giveplayerid] =0; new namestr[128]; format(namestr,sizeof(namestr),"%s",receivername); SetPlayerName(giveplayerid,namestr); return 1; }