24.08.2010, 16:28
Por ID:
Por Nick:
Final Game Mode:
pawn Код:
if((strcmp(cmd, "/deletarconta", true)==0 || strcmp(cmd, "/dc", true) ==0) && IsPlayerAdmin(playerid))
{
new tmp[128];
new name[24];
new file[128];
new tempx[128];
format(file,sizeof(file),"RoxBrasil/contas/%s.ini",name);
tempx = comandos(cmdtext, idx);
if(!strlen(tempx)) return SendClientMessage(playerid, Cinza, "[USE]: /dc [Nick]");
if(!IsPlayerConnected(strval(tmp))) return SendClientMessage(playerid, CWARN,"[ERRO]: Jogador nгo conectado!");
GetPlayerName(strval(tmp), name, sizeof(name));
format(file,sizeof(file),"RoxBrasil/contas/%s.ini",name);
fremove(file);
return 1;
}
pawn Код:
if((strcmp(cmd, "/deletarconta", true)==0 || strcmp(cmd, "/dc", true) ==0) && IsPlayerAdmin(playerid))
{
new tmp[128];
new file[128];
new tempx[128];
tempx = comandos(cmdtext, idx);
if(!strlen(tempx)) return SendClientMessage(playerid, Cinza, "[USE]: /dc [Nick]");
if(!IsPlayerConnected(strval(tmp))) return SendClientMessage(playerid, CWARN,"[ERRO]: Jogador nгo conectado!");
format(file,sizeof(file),"RoxBrasil/contas/%s.ini",tempx);
fremove(file);
return 1;
}
pawn Код:
comandos(const string[], &index)//strtok Modificada
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}
new offset = index;
new result[20];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}