Get and goto command involving cars
#1

How can I make my goto and get command take your car too
Код HTML:
//goto
CMD:goto(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] > 1) //== You would have something similar or you might not have it if you want anyone in the server to use the command
    {
        new Float:x, Float:y, Float:z, targetid;
        if(sscanf(params,"u", targetid)) return SendClientMessage(playerid, COLOR_RED, "Usage: /goto [Player ID/Name]");
        if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_RED, "Error: This player is not connected.");

        GetPlayerPos(targetid, x, y, z); //== Get's the player position of the player you wish to go to
        SetPlayerPos(playerid, x, y, z); //== Set's your position to his
    }
    else SendClientMessage(playerid, COLOR_RED, "You are not at least a level 1 admin!"); //== If the player trying to use the command is not admin they will get this
    return 1;
}
//get
CMD:get(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] > 1)
    {
        new Float:x, Float:y, Float:z, targetid;
        if(sscanf(params,"u", targetid)) return SendClientMessage(playerid, COLOR_RED, "Usage: /get [Player ID/Name]");
        if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_RED, "Error: This player is not connected.");

        GetPlayerPos(playerid, x, y, z); //== Same as above only here the code will get your position 
        SetPlayerPos(targetid, x, y+1, z); //== And bring the target to you
    }
    else SendClientMessage(playerid, COLOR_RED, "You are not at least a level 1 admin!");
    return 1;
}
Reply


Messages In This Thread
Get and goto command involving cars - by lramos15 - 29.07.2013, 15:53
Re: Get and goto command involving cars - by RajatPawar - 29.07.2013, 16:11
Re: Get and goto command involving cars - by lramos15 - 29.07.2013, 16:31
Re: Get and goto command involving cars - by lramos15 - 29.07.2013, 16:33
Re: Get and goto command involving cars - by Necip - 29.07.2013, 16:39
Re: Get and goto command involving cars - by lramos15 - 30.07.2013, 03:24
Re: Get and goto command involving cars - by wumpyc - 30.07.2013, 06:03
Re: Get and goto command involving cars - by lramos15 - 30.07.2013, 14:42
Re: Get and goto command involving cars - by [HiC]TheKiller - 31.07.2013, 06:29
Re: Get and goto command involving cars - by lramos15 - 31.07.2013, 15:56

Forum Jump:


Users browsing this thread: 2 Guest(s)