if (strcmp(cmd, "/daradmin", true, 10) == 0)
{
if(PlayerInfo[playerid][Admin] > 4)
{
new plid;
new niveladmin[20];
tmp = strtok(cmdtext, idx);
plid = strval(tmp);
niveladmin = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, AVISOADM, "[ERRO] Use: /daradmin [id] [nivel]");
return 1;
}
if(IsPlayerConnected(plid) == 0)
{
SendClientMessage(playerid, AVISOADM, "[ERRO] Player OFF-LINE");
return 1;
}
GetPlayerName(strval(tmp), pName, sizeof(pName));
GetPlayerName(playerid, adm, sizeof(adm));
format(stringa, sizeof(stringa), "[ADMCMD]:O admin %s lhe deu adm nivel:%s", adm,niveladmin);
SendClientMessage(plid, COLOR_DBLUE, stringa);
format(stringa, sizeof(stringa), "[ADMCMD]:Vocк deu admin para %s nivel:%s", adm,niveladmin);
SendClientMessage(playerid, COLOR_DBLUE, stringa);
PlayerInfo[plid][Admin] = niveladmin; //linha do erro u.u' 909
}
return 1;
}
C:\Users\a\Desktop\Drift BSC\gamemodes\BSCdrift.pwn(909) : error 006: must be assigned to an array Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
new niveladmin[20];
new niveladmin;
C:\Users\a\Desktop\Drift BSC\gamemodes\BSCdrift.pwn(892) : error 006: must be assigned to an array Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
niveladmin = strtok(cmdtext, idx);
niveladmin = strtok(cmdtext, idx);
niveladmin = strval(tmp);
Troque isto:
pawn Код:
pawn Код:
|