20.01.2011, 16:50
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
Please give me
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;
}
It's only possible in OnPlayerSpawn:
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;
}
new racestarted;
new InRace[MAX_PLAYERS];
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;
}
pawn Код:
pawn Код:
|