zroT Posted May 24, 2011 Posted May 24, 2011 [pawn] if(strcmp(cmd, "/unban", true) == 0) { if (PlayerInfo[playerid][pAdmin] >= 1) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /unban [playerid/PartOfName]"); return 1; } giveplayerid = ReturnUser(tmp); if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if(PlayerInfo[giveplayerid][pLocked] == 1) { PlayerInfo[giveplayerid][pLocked] = 0; TogglePlayerControllable(giveplayerid, 1); SendClientMessage(playerid, COLOR_YELLOW, "Account unlocked succesfuly."); } } } } else { SendClientMessage(playerid, COLOR_GRAD1, "You must be a level 3 admin to do this command."); } return 1; }[/pawn]Cum fac sa mearga??
Question
zroT
[pawn] if(strcmp(cmd, "/unban", true) == 0)
{
if (PlayerInfo[playerid][pAdmin] >= 1)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /unban [playerid/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(PlayerInfo[giveplayerid][pLocked] == 1)
{
PlayerInfo[giveplayerid][pLocked] = 0;
TogglePlayerControllable(giveplayerid, 1);
SendClientMessage(playerid, COLOR_YELLOW, "Account unlocked succesfuly.");
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "You must be a level 3 admin to do this command.");
}
return 1;
}[/pawn]
Cum fac sa mearga??
1 answer to this question
Recommended Posts