zroT Posted May 24, 2011 Report Share 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?? Link to comment Share on other sites More sharing options...
Guest farse Posted May 24, 2011 Report Share Posted May 24, 2011 vezi ca ai pus numele comenzii /unban xD Link to comment Share on other sites More sharing options...
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??
Link to comment
Share on other sites
1 answer to this question
Recommended Posts