CMD:gotocar
#1

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;
}
Reply
#2

So...what's your problem?(again)
Reply
#3

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);

Reply
#4

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

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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)