[Tool/Web/Other] Xtreme Pawnferter
#2

Script
-------------------------
Scripting
  • Information
  • Callbacks
  • Functions

______________________________________
Information
The generator generates a file Race.Crshr, if you change anything in that file.
maybe your checkpoints/vehicles/objects won't work anymore!
To edit the checkpoints, use the Generated_Pawn.pwn file.
You can only have one Race.Crshr in a directory.




______________________________________
Callbacks
Because i used some callbacks i has to make new one.. and here they are.


Code:
public Crshr_Init()
{
	return 1;
}
This is a replace for OnGameModeInit and OnFilterScriptInit, server reeds it after filterscript loade and after a GMX.



Code:
public Crshr_Exit()
{
	return 1;
}
This is a replace for OnGameModeExit and OnFilterScriptExit, The server reeds when you unload the filterscript or before a GMX.



Code:
public OnPlayerRaceStart(playerid)
{
	return 1;
}
Called when a race starts for a player, you can put here things like
Code:
GameTextForPlayer(playerid,"~w~Youre race is started!",3000,5);

Code:
public OnPlayerFinish(playerid,CheckPoint)
{
	return 1;
}
Replaces the OnPlayerEnterRaceCheckpoint and add's a checkpoint ID, You can use the checkpoint ID for a text message count or whatelse, The CheckPoint ID is the checkpoint what the player just enter'd
Code:
switch(CheckPoint)
{
	case 1:
	{
		SendClientMessage(playerid,COLOR_BLUE,"You reached checkpoint 1!");
	}
	case 2:
	{
	    SendClientMessage(playerid,COLOR_BLUE,"You reached checkpoint 1!");
	}
}
// Or...
if(CheckPoint == 8)
{
    SendClientMessage(playerid,COLOR_BLUE,"Congrets!. You finished the race");
}
Some ideas



Code:
public OnPlayerRaceStop(playerid)
{
	return 1;
}
Called when a race stop for a player. Again for a message or a varible.




______________________________________
Functions
Code:
StartRaceForAll()
This function starts the race for all players that are on the server.



Code:
StartRaceForPlayer(playerid)
Start a race for a specific player
  • playerid - a ID of a online player



Code:
StopRaceForAll()
This function stops the race for all playes that are on the server.



Code:
StopRaceForPlayer(playerid)
Stops a race for a specific player
  • playerid - a ID of a online player


Code:
ShowCheckPointCount(bool:Show)
There is a build in Checkpoint counter Checkpoint: ?/?. That can be turned off/on. default its turned ON!.
  • Show - On = true, Off = false


Code:
IsPlayerRacing(playerid)
This line checks if the player is racing, returns true while racing, else false.
  • playerid - a ID of a online player
Code:
//maybe for a teleport
if(!IsPlayerRacing(playerid)) SetPlayerPos(1234.0,1234.0,10.0);

Code:
IsRaceGoing()
Checks if there is a race at the moment
Code:
// A message?
if(IsRaceGoing()) SendClientMessageToAll(COLOR_BLUE,"Go Racers Go!");

Code:
SetSpecificCar(model)
You can set the option. that you only can drive this race with 1 type of vehicle.
  • model - Vehicle Model, can be turned off with 0


Code:
SetCheckPointSize(size)
Change the size of the checkpoints, Default its 8
  • size - The size you want your checkpoints. starting at 0


Code:
SetCheckPointSize(size)
Change the size of the finish checkpoint, Default its 10
  • size - The size you want your finish checkpoint . starting at 0

______________________________________
Reply


Messages In This Thread
[MTA 1.0.4 conversion added!] Xtreme Pawnferter V1.7.1 - by gamer931215 - 07.08.2010, 01:09
Xtreme Pawnferter - Script - by Crusher!! - 07.08.2010, 01:10
Re: Xtreme Pawnferter - by Toni - 07.08.2010, 01:24
Re: Xtreme Pawnferter - by Kyosaur - 07.08.2010, 01:44
Re: Xtreme Pawnferter - by gamer931215 - 07.08.2010, 01:52
Re: Xtreme Pawnferter - by gamer931215 - 07.08.2010, 03:01
Re: Xtreme Pawnferter - by Crusher!! - 07.08.2010, 03:09
Re: Xtreme Pawnferter - by DiddyBop - 07.08.2010, 03:24
Re: Xtreme Pawnferter - by Crusher!! - 07.08.2010, 03:29
Re: Xtreme Pawnferter - by gamer931215 - 07.08.2010, 08:31
Re: Xtreme Pawnferter - by ViruZZzZ_ChiLLL - 07.08.2010, 10:33
Re: Xtreme Pawnferter - by Lorenc_ - 07.08.2010, 10:43
Re: Xtreme Pawnferter - by [03]Garsino - 07.08.2010, 10:48
Re: Xtreme Pawnferter - by Crusher!! - 07.08.2010, 12:04
Re: Xtreme Pawnferter - by gamer931215 - 07.08.2010, 15:27
Re: Xtreme Pawnferter - by gamer931215 - 07.08.2010, 15:30
Re: Xtreme Pawnferter - by ViruZZzZ_ChiLLL - 07.08.2010, 16:19
Re: Xtreme Pawnferter - by gamer931215 - 07.08.2010, 17:14
Re: Xtreme Pawnferter - by Hiddos - 07.08.2010, 17:16
Re: Xtreme Pawnferter - by Crusher!! - 07.08.2010, 18:00
Re: Xtreme Pawnferter - by Hiddos - 07.08.2010, 18:02
Re: Xtreme Pawnferter - by ViruZZzZ_ChiLLL - 07.08.2010, 18:02
Re: Xtreme Pawnferter - by Crusher!! - 07.08.2010, 18:03
Re: Xtreme Pawnferter - by gamer931215 - 07.08.2010, 18:04
Re: Xtreme Pawnferter - by John_F - 07.08.2010, 18:07
Re: Xtreme Pawnferter - by [L3th4l] - 07.08.2010, 18:07
Re: Xtreme Pawnferter - by gamer931215 - 07.08.2010, 18:15
Re: Xtreme Pawnferter - by gamer931215 - 07.08.2010, 23:57
Re: Xtreme Pawnferter - by Crusher!! - 09.08.2010, 19:25
Re: Xtreme Pawnferter - by doreto - 28.11.2010, 10:00
Respuesta: Xtreme Pawnferter - by Host-samp - 13.03.2011, 22:15

Forum Jump:


Users browsing this thread: 10 Guest(s)