Help me :)
#2

pawn Код:
#include <a_samp>
#include <zcmd>
new speed[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
    speed[playerid] = 0;
    return 1;
}
public OnPlayerDisconnect(playerid)
{
    speed[playerid] = 0;
    return 1;
}
CMD:speedboost(playerid, params[])
{
    if(speed[playerid] == 0) {
        speed[playerid] = 1;
    }
    else
    {
        speed[playerid] = 0;
    }
    return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if (IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        new vehicleid = GetPlayerVehicleID(playerid);
        if(newkeys && KEY_SUBMISSION) {
            if(speed[playerid] == 1) {
                new Float:vx,Float:vy,Float:vz;
                GetVehicleVelocity(GetPlayerVehicleID(playerid), vx, vy, vz);
                SetVehicleVelocity(vehicleid, vx * 2, vy * 2, vz * 2);
                return 1;
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
Help me :) - by [BP]Tony - 13.03.2012, 20:30
Re: Help me :) - by Snipa - 13.03.2012, 20:44
Re: Help me :) - by TTJJ - 13.03.2012, 20:52
Re: Help me :) - by iPLEOMAX - 13.03.2012, 20:54
Re: Help me :) - by [BP]Tony - 13.03.2012, 21:06
Re: Help me :) - by iPLEOMAX - 13.03.2012, 21:14
Re: Help me :) - by [BP]Tony - 14.03.2012, 06:09
Re: Help me :) - by Reklez - 14.03.2012, 06:16

Forum Jump:


Users browsing this thread: 1 Guest(s)