Samp God Car Cmd Not WOrking Help!
#4

this is mine. hope it works

pawn Код:
new OnPlayerUpdateExTimer[MAX_PLAYERS];
new bool:godcar[MAX_PLAYERS];

forward OnPlayerUpdateEx(playerid);

public OnPlayerConnect(playerid)
{
    OnPlayerUpdateExTimer[playerid] = SetTimerEx("OnPlayerUpdateEx", 1000, true, "i", playerid);
    godcar[playerid] = false;
    return 1;
}

public OnPlayerDisconnect(playerid)
{
    KillTimer(OnPlayerUpdateExTimer[playerid]);
    godcar[playerid] = false;
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp("/godcar", cmdtext, true, 10) == 0)
    {
        if(godcar[playerid] == false)
        {
            godcar[playerid] = true;
            SendClientMessage(playerid, -1, "Activated!");
        }
        else
        if(godcar[playerid] == true)
        {
            godcar[playerid] = false;
            SendClientMessage(playerid, -1, "DeActivated!");
        }
        return 1;
    }
    return 0;
}

public OnPlayerUpdateEx(playerid)
{
    if(IsPlayerInAnyVehicle(playerid))
    {
        if(godcar[playerid] == true)
        {
            RepairVehicle(GetPlayerVehicleID(playerid));
            SetVehicleHealth(GetPlayerVehicleID(playerid), 1000);
        }
    }
}
Reply


Messages In This Thread
Samp God Car Cmd Not WOrking Help! - by MrCripBloodz - 27.06.2012, 03:35
Re: Samp God Car Cmd Not WOrking Help! - by Kindred - 27.06.2012, 03:42
Re: Samp God Car Cmd Not WOrking Help! - by MrCripBloodz - 08.07.2012, 01:05
Re: Samp God Car Cmd Not WOrking Help! - by Kirollos - 08.07.2012, 01:20
Re: Samp God Car Cmd Not WOrking Help! - by MrCripBloodz - 08.07.2012, 01:26
Re: Samp God Car Cmd Not WOrking Help! - by SnG.Scot_MisCuDI - 08.07.2012, 01:39
Re: Samp God Car Cmd Not WOrking Help! - by MrCripBloodz - 08.07.2012, 01:47
Re: Samp God Car Cmd Not WOrking Help! - by MrCripBloodz - 08.07.2012, 01:50

Forum Jump:


Users browsing this thread: 3 Guest(s)