Race boats -
HavingGood - 02.12.2012
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
------------------------------------------------------
Re: Race boats -
NoahF - 02.12.2012
So simple. Can you post a Pastebin link so we don't have to download it and look at it?
Re: Race boats -
Plovix - 02.12.2012
Nice,but simple.Add more checkpoints.
Re: Race boats -
HavingGood - 02.12.2012
Was added:
Command: /resrace - Resets race
- Optimized code
Re: Race boats -
Sp3cter - 02.12.2012
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 ?
Re: Race boats -
HavingGood - 02.12.2012
This is removes the boat
Re: Race boats -
HavingGood - 02.12.2012
Was added:
Command:
- /fix - Fix car for player
- Fixed some things
Re: Race boats -
Sp3cter - 02.12.2012
Quote:
Originally Posted by HavingGood
This is removes the boat
|
You tested the code ? Do race 2 times , and see what happens
Re: Race boats -
HavingGood - 02.12.2012
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);
}
Re: Race boats -
Sp3cter - 02.12.2012
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.