Can someone get this command
#1

Can someone get this command to work i tried enough with switching deleting adding and cant get it to work, someone give me some help please

pawn Код:
#include <a_samp>

new GodCarMode[MAX_PLAYERS];
#define INFINITY (Float:1000000)
#define COLOR_MAGENTA 0xFF00FFFF

public OnPlayerConnect(playerid)
{
    GodCarMode[playerid] = 0;
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/godcar", true) == 0)
{
    new playerState = GetPlayerState(playerid);
    if (playerState == PLAYER_STATE_PASSENGER || playerState == PLAYER_STATE_DRIVER)
    {
        if(IsPlayerAdmin(playerid))
        {
            if(GodCarMode[playerid] == 0)  
            {
                SendClientMessage(playerid, COLOR_MAGENTA, "GOD CAR MODE ON");
                SetVehicleHealth(playerid, INFINITY);
                GodCarMode[playerid] = 1;
            }
            else if(GodCarMode[playerid] == 1)
            {
                SendClientMessage(playerid, COLOR_MAGENTA, "GOD CAR MODE OFF");
                SetVehicleHealth(playerid, 1000);
                GodCarMode[playerid] = 0;
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_MAGENTA, "You are not an admin!");
        }  
    }
    else
    {
        SendClientMessage(playerid, COLOR_MAGENTA, "You are not in any vehicle");
    }
    return 1;
}
return 0;
}
Reply


Messages In This Thread
Can someone get this command - by willsuckformoney - 17.07.2010, 15:44
Re: Can someone get this command - by DiddyBop - 17.07.2010, 16:48
Re: Can someone get this command - by willsuckformoney - 17.07.2010, 16:50
Re: Can someone get this command - by DiddyBop - 17.07.2010, 16:56

Forum Jump:


Users browsing this thread: 1 Guest(s)