Need help with goto Command
#2

Try This
pawn Code:
command(goto, playerid, params[])
{
    new ID;
    new vehicleid = GetPlayerVehicleID(playerid);
    if(sscanf(params, "u", ID)) SendClientMessage(playerid, COLOR_RED, "USAGE: /goto [id]");
    else if(IsPlayerConnected(ID) == 0) SendClientMessage(playerid, COLOR_RED, "Player is not connected!");
    else if(IsPlayerInVehicle(playerid, vehicleid))
    {
    new Float:x, Float:y, Float:z;
    GetVehiclePos(vehicleid, x, y, z);
    SetVehiclePos(vehicleid, x+1, y+1, z);
    }
    else
    {
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    SetPlayerPos(playerid, x+1, y+1, z);
    }
    return 1;
}
Reply


Messages In This Thread
Need help with goto Command - by mrsamp - 17.08.2011, 16:32
Re: Need help with goto Command - by [OC]Zero - 17.08.2011, 16:36
Re: Need help with goto Command - by mrsamp - 17.08.2011, 16:41
Re: Need help with goto Command - by [OC]Zero - 17.08.2011, 16:43
Re: Need help with goto Command - by mrsamp - 18.08.2011, 14:19
Re: Need help with goto Command - by Wesley221 - 18.08.2011, 14:45
Re: Need help with goto Command - by mrsamp - 18.08.2011, 14:47

Forum Jump:


Users browsing this thread: 2 Guest(s)