/Joinrace loop command [HELP] PLEAZZ!
#2

I'm gonna give it a shot, 1 sec

EDIT: It's not a loop, but it will get the job done.

pawn Код:
#include <a_samp>
//Start under ^^
new Rcar;
new Rcar2;
new Rcar3;
//Need to define the cars, so we can check to see if someone is in them
public OnGameModeInit()
{
    Rcar=AddStaticVehicle(560,2485.6999500,-1667.9000200,13.1000000,0.0000000,32,79); //Sultan
    Rcar2=AddStaticVehicle(560,2490.6999500,-1667.9000200,13.1000000,0.0000000,32,79); //Sultan
    Rcar3=AddStaticVehicle(560,2495.6999500,-1667.9000200,13.1000000,0.0000000,32,79); //Sultan
    return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/joinrace", cmdtext, true, 10) == 0)
    {
        if (IsPlayerInVehicle(playerid, Rcar))
        {
            if (IsPlayerInVehicle(playerid, Rcar2))
            {
                if (IsPlayerInVehicle(playerid, Rcar3))
                {
                    SendClientMessage(playerid, 0xFFFF00FF , "The Race is FULL.");
                    return 1;
                }
                else
                {
                    PutPlayerInVehicle(playerid, Rcar3, 0);
                    return 1;
                }
            }
            else
            {
                PutPlayerInVehicle(playerid, Rcar2, 0);
                return 1;
            }
        }
        else
        {
            PutPlayerInVehicle(playerid, Rcar, 0);
            return 1;
        }
    }
    return 0;
}
Reply


Messages In This Thread
/Joinrace loop command [HELP] PLEAZZ! - by chubz - 10.07.2013, 07:32
Re: /Joinrace loop command [HELP] PLEAZZ! - by Aerotactics - 10.07.2013, 07:47
Re: /Joinrace loop command [HELP] PLEAZZ! - by Aerotactics - 10.07.2013, 08:13
Re: /Joinrace loop command [HELP] PLEAZZ! - by chubz - 10.07.2013, 09:54
Re: /Joinrace loop command [HELP] PLEAZZ! - by Aerotactics - 10.07.2013, 12:40
Re: /Joinrace loop command [HELP] PLEAZZ! - by chubz - 12.07.2013, 04:27
Re: /Joinrace loop command [HELP] PLEAZZ! - by Aerotactics - 12.07.2013, 10:16
Re: /Joinrace loop command [HELP] PLEAZZ! - by chubz - 19.07.2013, 08:02

Forum Jump:


Users browsing this thread: 1 Guest(s)