06.10.2015, 04:06
E ai, beleza? tenho um sistema aqui e estou fazendo um cmd, mais n esta funcionando por que?
Tipo, acima й para dar uma funзгo ae o id, mais o problema й que n consigo definir em letras a funзгo, pq carrega e salva por letras e esta criando por letras, e sim por nъmeros, o que faзo acima?
sistema:
PHP Code:
if (strcmp(cmd, "/admfuncao", true) == 0)
{
if (AccountData[playerid][pAdmin] == 3000)
{
tmp = strtok(cmdtext, idx);
if (!strlen(tmp)) return SendClientMessage(playerid, -1, "USE: /admfuncao [ID/Nome] [Funзгo]");
giveplayerid = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if (!strlen(tmp)) return SendClientMessage(playerid, -1, "USE: /admfuncao [ID/Nome] [Funзгo]");
new funcao = strval(tmp);
if (IsPlayerConnected(giveplayerid))
{
if (giveplayerid != INVALID_PLAYER_ID)
{
AccountData[playerid][pFuncao] = funcao;
}
}
}
else SendClientMessage(playerid, COLOR_GRAD1, "ERRO: Vocк nгo tem nнvel administrativo suficiente.");
return 1;
}
sistema:
PHP Code:
strmid(AccountData[playerid][pFuncao], "Administrar", 0, strlen("Administrar"), 255);
pFuncao[56]