[Ajuda] comando /ir
#3

Quote:
Originally Posted by iCasTiel
Посмотреть сообщение
pawn Код:
CMD:ir(playerid,params[]) {

    if ( isnull(params))
        return SendClientMessage(playerid, -1, "[ERRO] ID invalido");
       
    new id = strval(params);
   
    if(!IsPlayerConnected(id))
        return SendClientMessage(playerid, -1, "[ERRO] Uso: /ir [playerid]");
               
    if ( pAdmin[playerid] == 0)
        return SendClientMessage(playerid,-1,"Voce nao tem permissao para usar este comando");
       
    new Float:x, Float:y, Float:z;
    GetPlayerPos(id, x, y, z);
    SetPlayerPos(playerid, x, y,z);
    SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(id));
    SetPlayerInterior(playerid, GetPlayerInterior(id));
   
    new nome[24], string[128];
    GetPlayerName(playerid, nome, 24);
   
    format(string, sizeof(string), "{FF0000}(INFO) {FFFFFF}O Admin %s (%d)(») {0000FF}Teleportou ate voce", nome, playerid);
    SendClientMessage(id,-1, string);
   
    GetPlayerName(id, nome, 24);
    format(string, sizeof(string), "{FF0000}(INFO) {FFFFFF}Voce teleportou ate(») {0000FF} %s (%d)", nome, id);
    SendClientMessage(playerid,-1, string);
   
    return 1;
}
valeu deu certo voce soh trocou o isnull pelo !isplayerconect mas eu ja arrumei
pawn Код:
CMD:ir(playerid,params[]) {

    if ( pAdmin[playerid] == 0)
    return SendClientMessage(playerid,-1,"Voce nao tem permissao para usar este comando");
   
    if ( isnull(params))
        return SendClientMessage(playerid, -1, "[ERRO] Uso: /ir [playerid]");

    new id = strval(params);

    if(!IsPlayerConnected(id))
        return SendClientMessage(playerid, -1, "[ERRO] ID invalido");
       
    if(pAdmin[playerid] >= 1){
    new Float:x, Float:y, Float:z;
    GetPlayerPos(id, x, y, z);
    SetPlayerPos(playerid, x, y,z);
    SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(id));
    SetPlayerInterior(playerid, GetPlayerInterior(id));

    new nome[24], string[128];
    GetPlayerName(playerid, nome, 24);

    format(string, sizeof(string), "{FF0000}(INFO) {FFFFFF}O Admin %s (%d)(») {0000FF}Teleportou ate voce", nome, playerid);
    SendClientMessage(id,-1, string);

    GetPlayerName(id, nome, 24);
    format(string, sizeof(string), "{FF0000}(INFO) {FFFFFF}Voce teleportou ate(») {0000FF} %s (%d)", nome, id);
    SendClientMessage(playerid,-1, string);
    }
    return 1;
}
REP++
Reply


Messages In This Thread
comando /ir - by williamgato - 18.04.2014, 19:15
Re: comando /ir - by Gii - 18.04.2014, 19:22
Re: comando /ir - by williamgato - 18.04.2014, 19:31

Forum Jump:


Users browsing this thread: 1 Guest(s)