SA-MP Forums Archive
CMD:gotocar - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: CMD:gotocar (/showthread.php?tid=406697)



CMD:gotocar - UnknownGamer - 11.01.2013

Whats up with this?

pawn Код:
CMD:gotocar(playerid, params[])
{
    new Float:x,Float:y,Float:z;
    if (sscanf(params, "fff", x, y, z)) SendClientMessage(playerid, -1, "CMD: /gotocar [CarID]");
    GetVehiclePos(GetPlayerVehicleID(playerid), x, y, z);
    if (GetPlayerState(playerid) == 2)
    {
        SetPlayerPos(playerid, x,y,z+2);
    }
    else
    {
        SetPlayerPos(playerid, x,y,z+2);
    }
    return 1;
}



Re: CMD:gotocar - DiGiTaL_AnGeL - 11.01.2013

So...what's your problem?(again)


Re : CMD:gotocar - yusei - 11.01.2013

PHP код:
CMD:gotocar(playeridparams[])
{
    new 
v;
    if (
sscanf(params"d"v)) return  SendClientMessage(playerid, -1"CMD: /gotocar [CarID]");
    new 
string[64];
    new 
Float:XFloat:YFloat:Z;
    
GetVehiclePos(vXYZ);
    
SetPlayerPos(playeridX+1YZ)
    
format(stringsizeof(string), "You teleported to vehicle %d!"vehid);
    
SendClientMessage(playerid, -1string);




Re: CMD:gotocar - RedCrossER - 11.01.2013

Waht the Explain What is the problem and what we have to fix. Damn


Re: CMD:gotocar - venomlivno8 - 11.01.2013

pawn Код:
CMD:gotocar(playerid, params[])
{
    if(playerstate == 1)
    {
        new vid;
        if(sscanf(params, "n", vid)) return SCM(playerid, COL_WHITE, "    USAGE: /gotocar [carid]");
        new Float: x,
        Float: y,
        Float: z;
        GetVehiclePos(vid, x, y, z);
        SetPlayerPos(playerid, x, y, z+2);
    }
    else if(playerstate == 2 || playerstate == 3)
    {
        new vid,
        pvid = GetPlayerVehicleID(playerid);
        if(sscanf(params, "n", vid)) return SCM(playerid, COL_WHITE, "    USAGE: /gotocar [carid]");
        SetVehicleToRespawn(pvid);
        RemovePlayerFromVehicleEx(playerid);
        new Float: x,
        Float: y,
        Float: z;
        GetVehiclePos(vid, x, y, z);
        SetPlayerPos(playerid, x, y, z+2);
    }
    return 1;
}