[Pedido] Comando de Congelar Todos
#2

Quote:
Originally Posted by BlueX
View Post


Como o AFerreira basta usar essas duas coisas, vou mostrar um exemplo para vocк.

pawn Code:
CMD:congelar(playerid,params[]){
    if(!IsPlayerAdmin(admin))
        return SendClientMessage(playerid,-1,"Vocк nгo й Admin RCON");
    if(isnull(params))
        return SendClientMessage(playerid,-1,"USE: /congelar [ID]");
    new id;
    id = strval(params);
    TogglePlayerControllable(playerid,0);
    SendClientMessage(id,-1,"Vocк foi congelado por um admin");
    SetTimerEx("Descongelar",10000,0,"i",id);
    return 1;
}

forward Descongelar(id); public Descongelar(id)
    return IsPlayerConnected(id) ? true : (TogglePlayerControllable(id,1),SendClientMessage(playerid,-1,"Descongelado"), true);
  • SetTimerEx
    • Й o SetTimer com uma mudanзa, ou seja, ele tem a capacidade de transferir variaveis para a callback
  • TogglePlayerControllable
    • Serve para vocк tornar o player controlavel, ou seja, se for 1 serб igual a sim, se for 0 serб igual a nгo
Espero ter ajudado (:

Leia sobre https://sampforum.blast.hk/showthread.php?tid=290735 para usar em todos.
Reply


Messages In This Thread
Comando de Congelar Todos - by ksguinet - 25.02.2014, 02:21
Re: Comando de Congelar Todos - by Diogo123 - 25.02.2014, 02:29
Re: Comando de Congelar Todos - by ksguinet - 25.02.2014, 02:32
Re: Comando de Congelar Todos - by IgorVini - 25.02.2014, 11:09
Re: Comando de Congelar Todos - by Diogo123 - 25.02.2014, 16:00
Re: Comando de Congelar Todos - by PT - 25.02.2014, 21:00
Re: Comando de Congelar Todos - by ksguinet - 25.02.2014, 22:43

Forum Jump:


Users browsing this thread: 2 Guest(s)