Speedo meter script help here please
#2

pawn Код:
#include <a_samp>
new vNRG[MAX_PLAYERS];

stock DestroyPersonalNRG(playerid)
{
    if(vNRG[playerid] != 0)
        DestroyVehicle(vNRG[playerid]);
    vNRG[playerid] = 0;
}

public OnFilterScriptExit()
{
    for(new playerid = 0, players = GetMaxPlayers(); playerid < players; playerid ++)
        DestroyPersonalNRG(playerid);
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    DestroyPersonalNRG(playerid);
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp("/pnrg", cmdtext, true, 5) == 0)
    {
        new Float:x, Float:y, Float:z, Float:a;
        GetPlayerPos(playerid, x, y, z);
        if(IsPlayerInAnyVehicle(playerid))
            GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
        else
            GetPlayerFacingAngle(playerid, a);

        if(vNRG[playerid] != 0)
            DestroyVehicle(vNRG[playerid]);
        vNRG[playerid] = CreateVehicle(522, x, y, z, a, -1, -1, -1);
        LinkVehicleToInterior(vNRG[playerid], GetPlayerInterior(playerid));
        PutPlayerInVehicle(playerid, vNRG[playerid], 0);
        return 1;
    }
    return 0;
}
Reply


Messages In This Thread
Speedo meter script help here please - by wolvaren1999 - 05.01.2014, 18:53
Re: Speedo meter script help here please - by RedFusion - 05.01.2014, 20:40
Re: Speedo meter script help here please - by wolvaren1999 - 06.01.2014, 10:30
Re: Speedo meter script help here please - by RedFusion - 06.01.2014, 13:06
Re: Speedo meter script help here please - by wolvaren1999 - 06.01.2014, 13:13
Re: Speedo meter script help here please - by RedFusion - 06.01.2014, 14:30
Re: Speedo meter script help here please - by wolvaren1999 - 06.01.2014, 15:32
Re: Speedo meter script help here please - by RedFusion - 06.01.2014, 15:36
Re: Speedo meter script help here please - by sammp - 06.01.2014, 15:38
Re: Speedo meter script help here please - by wolvaren1999 - 07.01.2014, 09:39

Forum Jump:


Users browsing this thread: 1 Guest(s)