Ehh - some help
#3

I did this in like 2 minutes;

pawn Код:
command(vdive, playerid, params[])
{
    if(sscanf(params, "d", value))
        return SendClientMessage(playerid, COLOR_WHITE, "SYNTAX: /vdive [height]");
    if(!IsPlayerInAnyVehicle(playerid))
        return SendClientMessage(playerid, COLOR_RED, "ERROR: You aren't in a vehicle!");
    new Float:Pos[3], value;
    new vehid = GetPlayerVehicleID(playerid);
    GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
    SetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]+value);
    SetVehiclePos(vehid, Pos[0], Pos[1], Pos[2]+value);
    PutPlayerInVehicle(playerid, vehid, 0);
    return 1;
}
It uses ZCMD and SSCANF.
Reply


Messages In This Thread
Ehh - some help - by SparkZ_ - 02.12.2010, 15:50
Re: Ehh - some help - by Gh0sT_ - 02.12.2010, 15:54
Re: Ehh - some help - by Scenario - 02.12.2010, 15:55
Re: Ehh - some help - by SparkZ_ - 02.12.2010, 15:58
Re: Ehh - some help - by Scenario - 02.12.2010, 15:58

Forum Jump:


Users browsing this thread: 1 Guest(s)