[Ajuda] :) ajuda aqui fasendo favor
#2

pawn Код:
if(strcmp(cmd, "/punirr", true) == 0) {
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(pAdmin[playerid] == 1 || pAdmin[playerid] == 2 || pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5){
new tmp[256];
new plid;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, Vermelho, "| ERRO | Digite: /punirr [id] [Tempo] [motivo]");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, Vermelho, "| ERRO | Digite: /punirr [id] [Tempo] [motivo]");
return 1;
}
new time = strval(tmp);
if(time < 1 || time > 20) {SendClientMessage(playerid, Vermelho, "| ERRO | O Tempo nгo pode ser menor que 1 nem maior que 20 !"); return 1; }
tmp = strtok(cmdtext, idx);{
SendClientMessage(playerid, Vermelho, "| ERRO | Digite: /punirr [id] [Tempo] [motivo]");
return 1;
}
plid = strval(tmp);
new pname[MAX_PLAYER_NAME];
GetPlayerName(plid, pname, MAX_PLAYER_NAME);
format(file2, sizeof(file2), PASTA_CONTAS, pname);
if(IsPlayerConnected(plid)){
  new length = strlen(cmdtext);
  while ((idx < length) && (cmdtext[idx] <= ' ')) {
    idx++;
    new Hour,Min,Sec;
    gettime(Hour,Min,Sec);
    SetPlayerPos(plid, 263.8820,77.4002,1001.0391);
    SetPlayerInterior(plid, 6);
    SetPlayerHealth(plid, 99999);
    ResetPlayerWeapons(plid);
    dini_IntSet(file2, "Preso", 1);
    SendClientMessageToAll(tcadm, string);
    new offset = idx;
    new result[64];
    while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) {
      result[idx - offset] = cmdtext[idx];
      idx++;
    }
    result[idx - offset] = EOS;
    if(!strlen(result)){
      format(string,256,"| INFO | O administrador %s Prendeu o jogador %s Tempo %d :( Motivo: %s )", Hour,Min,Sec);
      SendClientMessageToAll(-1,string);
      GameTextForPlayer(playerid,"~w~ PRESO", 2000, 1);
      Preso[plid] = 1;
    }
  }
}
else{
  format(string, sizeof(string), " | ERRO | ID %d invбlido!", plid);
  SendClientMessage(playerid, Vermelho, string);
}
return 1;

}
tenta ae.
Reply


Messages In This Thread
:) ajuda aqui fasendo favor - by Cromado - 11.06.2013, 15:08
Re: :) ajuda aqui fasendo favor - by Blix - 11.06.2013, 19:40
Re: :) ajuda aqui fasendo favor - by AlucardSnow - 11.06.2013, 19:42
Re: :) ajuda aqui fasendo favor - by Cromado - 11.06.2013, 20:30
Re: :) ajuda aqui fasendo favor - by ProKillerpa - 11.06.2013, 20:33
Re: :) ajuda aqui fasendo favor - by Cromado - 11.06.2013, 20:38
Re: :) ajuda aqui fasendo favor - by Cromado - 12.06.2013, 01:08
Re: :) ajuda aqui fasendo favor - by Cromado - 12.06.2013, 03:07
Re: :) ajuda aqui fasendo favor - by bruxo00 - 12.06.2013, 08:47

Forum Jump:


Users browsing this thread: 1 Guest(s)