[FilterScript] Race boats
#1

Hello user sa-mp.com
I show you my new FS.

As the name says, we need to race
The script is intended as entertainment for players

Race ends when the first person reaches a CP.




Commands in Version 1.0:

/sbrace - Only Admin
/brace - In all



Commands in Version 1.1:

/sbrace - Only Admin
/resrace - Only Admin
/brace - In all



Commands in Version 1.2:

/sbrace - Only Admin
/resrace - Only Admin
/brace - In all
/fix - For player


----------- Download: -----------

Version: v1.0:

Pastebin -> http://pastebin.com/yWHyFgzt

Amx -> http://www.sendspace.com/file/spjahw

Pwn -> http://www.sendspace.com/file/fjoeph

========================================

Version: v1.1:

--> http://pastebin.com/KhrxY4WD <--

========================================

========================================

Version: v1.2 !

--> http://pastebin.com/GcXGiSS3 <--

========================================

Greetings to all members sa-mp.com
------------------------------------------------------
Reply
#2

So simple. Can you post a Pastebin link so we don't have to download it and look at it?
Reply
#3

Nice,but simple.Add more checkpoints.
Reply
#4

Was added:
Command: /resrace - Resets race
- Optimized code
Reply
#5

pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
  if(BoatsStarted == 1)
  {
    if(SaveBoat[playerid] == 1)
    {
      new string[128];
      format(string, sizeof(string), "Player %s won the race, He receives 100000$!", Player(playerid));
      GivePlayerMoney(playerid, 100000);
      SendClientMessageToAll(0xff0000ff, string);
      BoatsStarted = 0;
      ResetRBoats(playerid);
      Deleteq(playerid);
    }
    for(new i=0; i<GetMaxPlayers(); i++)
    {
      SetPlayerPos(i, x3, y3, z3);
      SaveBoat[i] = 0;
      DisablePlayerCheckpoint(i);
    }
  }
  return 1;}
pawn Код:
forward ResetRBoats(playerid);
public ResetRBoats(playerid)
{
DestroyVehicle(Boat1);
DestroyVehicle(Boat2);
DestroyVehicle(Boat3);
DestroyVehicle(Boat4);
DestroyVehicle(Boat5);
DestroyVehicle(Boat6);
    return 1;
}
What about that ?
Reply
#6

This is removes the boat
Reply
#7

Was added:

Command:
- /fix - Fix car for player
- Fixed some things
Reply
#8

Quote:
Originally Posted by HavingGood
Посмотреть сообщение
This is removes the boat
You tested the code ? Do race 2 times , and see what happens
Reply
#9

Look:

Код:
        if(SaveBoat[i] == 1)
        {
          SetPlayerCheckpoint(i, -41.8892,-598.3351,-0.1207, 15.0);
          sh3 = random(6);
          if(sh3 == 0)
          {
            Boat1 = AddStaticVehicle(493,1942.417,-251.958,1.366,349.0,-1,-1);
            PutPlayerInVehicle(i, Boat1, 0);
          }
          else if(sh3 == 1)
          {
            Boat2 = AddStaticVehicle(493,1951.182,-253.128,1.388,349.0,-1,-1);
            PutPlayerInVehicle(i, Boat2, 0);
          }
          else if(sh3 == 2)
          {
            Boat3 = AddStaticVehicle(493,1955.429,-230.359,1.426,349.0,-1,-1);
            PutPlayerInVehicle(i, Boat3, 0);
          }
          else if(sh3 == 3)
          {
            Boat4 = AddStaticVehicle(493,1946.536,-228.397,1.402,349.0,-1,-1);
            PutPlayerInVehicle(i, Boat4, 0);
          }
          else if(sh3 == 4)
          {
            Boat5 = AddStaticVehicle(493,1961.798,-254.666,1.335,349.0,-1,-1);
            PutPlayerInVehicle(i, Boat5, 0);
          }
          else if(sh3 == 5)
          {
            Boat6 = AddStaticVehicle(493,1964.774,-231.862,1.401,349.0,-1,-1);
            PutPlayerInVehicle(i, Boat6, 0);
          }
Reply
#10

The boats spawn if the slot is used, if you got 4/6 slots used, it will spawn 4 boats, because just 4 players joined event. After the race is over, that boats respawn. Just do 2 race to see.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)