Gethere & Slap Command?
#2

pawn Код:
CMD:gethere(playerid, params[])
{
    if(pInfo[playerid][Level] > 2)
    {
        new
            victim,
            Float:x,
            Float:y,
            Float:z
        ;
       
        GetPlayerPos(playerid, x, y, z);
       
        if(!sscanf(params, "u", victim))
        {
            if( (IsPlayerConnected(victim)) && (victim != INVALID_PLAYER_ID) && (victim != playerid) )
            {
                if(!IsPlayerInAnyVehicle(victim)) {
                SetPlayerPos(victim, x+1, y+1, z);
                SetPlayerVirtualWorld(victim, GetPlayerVirtualWorld(playerid));
                SetPlayerInterior(victim, GetPlayerInterior(playerid)); }
                else {
                SetVehiclePos(GetPlayerVehicleID(victim), x+3, y+3, z);
                LinkVehicleToInterior(GetPlayerVehicleID(victim), GetPlayerInterior(playerid));
                SetVehicleVirtualWorld(GetPlayerVehicleID(victim), GetPlayerVirtualWorld(playerid)); }
               
            }
            else return SendClientMessage(playerid, RED, "ERROR: Player is yourself/disconnected/invalid");
        }
        else return SendClientMessage(playerid, RED, "USAGE: /gethere [playerid]");
    }
    else return SendClientMessage(playeird, RED,"ERROR: Level 3 and above only!");
    return 1;
}
Reply


Messages In This Thread
Gethere & Slap Command? - by NTS - 10.03.2012, 14:49
Re: Gethere & Slap Command? - by [XST]O_x - 10.03.2012, 15:37
Re: Gethere & Slap Command? - by NTS - 10.03.2012, 16:03
Re: Gethere & Slap Command? - by NTS - 11.03.2012, 10:08
Re: Gethere & Slap Command? - by Faisal_khan - 11.03.2012, 10:16

Forum Jump:


Users browsing this thread: 6 Guest(s)