SetTimer("GiveAllCar",12000,0); forward GiveAllCar(); public GiveAllCar() { for(new i; i<MAX_PLAYERS; i++) { new Car, Float:X,Float:Y,Float:Z,Float:Angle; GetPlayerPos(i,X,Y,Z); GetPlayerFacingAngle(i,Angle); Car= CreateVehicle(411,X,Y,Z,Angle,1,-1,-1); PutPlayerInVehicle(i,Car,0); } }
//OnPlayerSpawn SetTimerEx("GiveAllCar",12000,0,"d",playerid); forward GiveAllCar(playerid); public GiveAllCar(playerid) { new Car, Float:X,Float:Y,Float:Z,Float:Angle; GetPlayerPos(playerid,X,Y,Z); GetPlayerFacingAngle(playerid,Angle); Car= CreateVehicle(411,X,Y,Z,Angle,1,-1,-1); PutPlayerInVehicle(playerid,Car,0); }
SetTimerEx("GiveAllCar",12000,false,"i",playerid);
forward GiveAllCar();
public GiveAllCar()
{
for(new i; i<MAX_PLAYERS; i++)
{
new Car, Float:X,Float:Y,Float:Z,Float:Angle;
GetPlayerPos(i,X,Y,Z);
GetPlayerFacingAngle(i,Angle);
Car = CreateVehicle(411,X,Y,Z,Angle,1,-1,-1);
PutPlayerInVehicle(i,Car,0);
}
return 1;
}
SetTimer("GiveAllCar",12000,1);
Try Using
Код:
SetTimerEx("GiveAllCar",12000,false,"i",playerid); |
You only want to give the player one car, 2 minutes after he/she connects?
|
No, i have Race GM and when they spawn they get car and when they die they spectate.
|
So two minutes after the spawn they get a car, and when they lose it, no more car?
|
//OnPlayerSpawn
SetTimerEx("GiveAllCar",12000,0,"d",playerid);
forward GiveAllCar(playerid);
public GiveAllCar(playerid)
{
new Car, Float:X,Float:Y,Float:Z,Float:Angle;
GetPlayerPos(playerid,X,Y,Z);
GetPlayerFacingAngle(playerid,Angle);
Car= CreateVehicle(411,X,Y,Z,Angle,1,-1,-1);
PutPlayerInVehicle(playerid,Car,0);
return 1;
}