Need help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need help (
/showthread.php?tid=214100)
Need help -
domceo1 - 20.01.2011
Hi my need filterscript who will do when player connect to server he will teleport to race whit car,if race hawe been started he can spectate other players.
Please give me
Re: Need help -
domceo1 - 20.01.2011
Please hekp me
Re: Need help -
domceo1 - 20.01.2011
come on
Respuesta: Need help -
[M]xFire - 20.01.2011
It's only possible in OnPlayerSpawn:
pawn Код:
public OnPlayerSpawn(playerid)
{
if(racestarted == 0) {
SetPlayerPos(playerid, 0.0, 0.0, 0.0);//put the params correct
new vehicle = CreateVehicle(411, 0.0, 0.0, 0.0, 0.0, 1, 0, 100);//put the params correct
PutPlayerInVehicle(playerid, vehicle, 0);
InRace[playerid] = 1;
}
else {
PlayerSpectatePlayer(playerid, playerid-1);
return 1;
}
You can add more if you want..
Re: Respuesta: Need help -
SkizzoTrick - 20.01.2011
Quote:
Originally Posted by [M]xFire
It's only possible in OnPlayerSpawn:
pawn Код:
public OnPlayerSpawn(playerid) { if(racestarted == 0) { SetPlayerPos(playerid, 0.0, 0.0, 0.0);//put the params correct new vehicle = CreateVehicle(411, 0.0, 0.0, 0.0, 0.0, 1, 0, 100);//put the params correct PutPlayerInVehicle(playerid, vehicle, 0); InRace[playerid] = 1; } else { PlayerSpectatePlayer(playerid, playerid-1); return 1; }
You can add more if you want..
|
Yes,but you forgot to tell him how to create the "InRace" and "racestarted".
Do this
pawn Код:
//AT THE TOP
new racestarted;
new InRace[MAX_PLAYERS];
public OnPlayerSpawn(playerid)
{
if(racestarted == 0) {
SetPlayerPos(playerid, 0.0, 0.0, 0.0);//put the params correct
new vehicle = CreateVehicle(411, 0.0, 0.0, 0.0, 0.0, 1, 0, 100);//put the params correct
PutPlayerInVehicle(playerid, vehicle, 0);
InRace[playerid] = 1;
}
else {
PlayerSpectatePlayer(playerid, playerid-1);
return 1;
}
Re: Respuesta: Need help -
HyperZ - 20.01.2011
pawn Код:
new racestarted;
new InRace[MAX_PLAYERS];
pawn Код:
public OnPlayerSpawn(playerid)
{
if(racestarted == 0)
{
SetPlayerPos(playerid, 0.0, 0.0, 0.0);//put the XYZ Pos's correct
new vehicle = CreateVehicle(411, 0.0, 0.0, 0.0, 0.0, 1, 0, 100);//put the params correct
PutPlayerInVehicle(playerid, vehicle, 0);
InRace[playerid] = 1;
}
else
{
PlayerSpectatePlayer(playerid, playerid-1);
}
return 1;
}
Re: Respuesta: Need help -
SkizzoTrick - 20.01.2011
Quote:
Originally Posted by Clive
pawn Код:
new racestarted; new InRace[MAX_PLAYERS];
pawn Код:
public OnPlayerSpawn(playerid) { if(racestarted == 0) { SetPlayerPos(playerid, 0.0, 0.0, 0.0);//put the XYZ Pos's correct new vehicle = CreateVehicle(411, 0.0, 0.0, 0.0, 0.0, 1, 0, 100);//put the params correct PutPlayerInVehicle(playerid, vehicle, 0); InRace[playerid] = 1; } else { PlayerSpectatePlayer(playerid, playerid-1); } return 1; }
|
Why did you repost that ?xD