Respawn all cars
#5

Quote:
Originally Posted by knool
Quote:
Originally Posted by kobrasek
Код:
if(strcmp(cmdtext, "/resetcars", true) == 0){
new vh=CreateVehicle(400,0.0,0.0,0.0,0.0,-1,-1,-1);
DestroyVehicle(vh);
new p[MAX_VEHICLES];
for(new v = 0; v < vh; v++){
p[v]=0;
for(new i = 0; i < GetMaxPlayers(); i++){
if(IsPlayerInVehicle(i,v)) p[v]=1;
}
if(p[v]==0) SetVehicleToRespawn(v);
}
return 1;
}
tell after if work?
Thanks it works!
well the code is now:
Код:
	if(strcmp(cmdtext, "/resetcars", true) == 0){
new p[MAX_VEHICLES];
new vh=CreateVehicle(400,0.0,0.0,0.0,0.0,-1,-1,-1);
DestroyVehicle(vh);
for(new v = 0; v < vh; v++){
p[v]=0;
for(new i = 0; i < GetMaxPlayers(); i++){
if ((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >= 3)
if(IsPlayerInVehicle(i,v)) p[v]=1;
}
if(p[v]==0) SetVehicleToRespawn(v);
}
return 1;
}
still it is working as non admin. what now?
Reply


Messages In This Thread
Respawn all cars - by KnooL - 26.02.2009, 12:45
Re: Respawn all cars - by kobrasek - 26.02.2009, 12:52
Re: Respawn all cars - by KnooL - 26.02.2009, 13:10
Re: Respawn all cars - by kobrasek - 26.02.2009, 13:22
Re: Respawn all cars - by KnooL - 26.02.2009, 13:23
Re: Respawn all cars - by KnooL - 26.02.2009, 17:39
Re: Respawn all cars - by Coicatak - 26.02.2009, 21:48
Re: Respawn all cars - by kobrasek - 26.02.2009, 21:58
Re: Respawn all cars - by BeckzyBoi - 26.02.2009, 22:37
Re: Respawn all cars - by Coicatak - 27.02.2009, 10:51

Forum Jump:


Users browsing this thread: 9 Guest(s)