11.06.2012, 12:35
Sim, й possнvel. Sу que й mais recomendado usar sscanf do que strtok.
pawn Код:
if(strcmp(cmd, "/autorizartrampo", true) == 0)
{
new PlayerB, Adm[MAX_PLAYER_NAME], AdmB[MAX_PLAYER_NAME];
if(PlayerInfo[playerid][pAdmin] < 1340) return SendClientMessage(playerid, -1, "Vocк nгo tem permissгo!");
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, -1, "/autorizartrampo [playerid]");
PlayerB = ReturnUser(tmp);
AutorizadoT[PlayerB] = 1;
GetPlayerName(playerid, Adm, sizeof(Adm));
GetPlayerName(PlayerB, AdmB, sizeof(AdmB));
format(sStr, sizeof(sStr), "O admin %d %s[%d] autorizou o admin %d %s[%d] a trabalhar!", PlayerInfo[playerid][pAdmin], Adm, playerid, PlayerInfo[playerid][pAdmin], AdmB, PlayerB);
return 1;
}