Me ayudan con estas cosas??
#5

Comando goto:
pawn Код:
if(!strcmp(cmd, "/goto", true)){
        new tmp[256];
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))return SendClientMessage(playerid, 0xFFFFFFFF, "USO: /goto <playerid>");
        if(!IsNumeric(tmp))return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Debe ser un id valido");
        new id, name[MAX_PLAYER_NAME], namee[MAX_PLAYER_NAME];
        id = strval(tmp);
        if(id != INVALID_PLAYER_ID){
            if(IsPlayerConnected(id)){
                if(Pinfo[playerid][lock] == 0){
                    new Float:X, Float:Y, Float:Z, str[128];
                    GetPlayerPos(id, X, Y, Z);
                    SetPlayerPos(playerid, X+2, Y+2, Z);
                    GetPlayerName(id, name, sizeof(name));
                    GetPlayerName(playerid, namee, sizeof(namee));
                    format(str, sizeof(str), ">>Has sido teletransportado hacia %s(%i)", name, id);
                    SendClientMessage(playerid, 0xFFD900FF, str);
                    format(str, sizeof(str), ">>%s(%i) ha sido teletransportado a tu posicion", namee, playerid);
                    return SendClientMessage(playerid, 0xFFD900FF, str);
                }else return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Este jugador no admite teleport a йl");
            }else return SendClientMessage(playerid, 0xFF0000FF, "ERROR: jugador no conectado");
        }else return SendClientMessage(playerid, 0xFF0000FF, "ERROR: ID invalido");
    }
Comando lock:
pawn Код:
if(!strcmp(cmd, "/lock", true)){
        if(Pinfo[playerid][lock] == 0){
            Pinfo[playerid][lock] = 1;
            return SendClientMessage(playerid, 0xFFFF00FF, ">>Ahora nadie podra teletransportarce hacia ti");
        }
        else{
            Pinfo[playerid][lock] = 0;
            return SendClientMessage(playerid, 0xFFFF00FF, ">>Ahora los jugadores podran teletransportarce hacia ti");
        }
    }
Reply


Messages In This Thread
Me ayudan con estas cosas?? - by mamc_crazy - 08.09.2010, 19:03
Re: Me ayudan con estas cosas?? - by TheChaoz - 08.09.2010, 19:25
Respuesta: Me ayudan con estas cosas?? - by Cesar_Biker - 08.09.2010, 19:30
Respuesta: Me ayudan con estas cosas?? - by mamc_crazy - 08.09.2010, 23:47
Re: Me ayudan con estas cosas?? - by TheChaoz - 09.09.2010, 00:34
Respuesta: Me ayudan con estas cosas?? - by mamc_crazy - 09.09.2010, 01:48
Re: Me ayudan con estas cosas?? - by TheChaoz - 09.09.2010, 01:50

Forum Jump:


Users browsing this thread: 1 Guest(s)