07.09.2009, 16:04
Hi i need some help
I need a spec system that can be excecuted on any moment( on playerstate change on playerdeath etc )
then you will spec a person in a vehicle( you spec vehicle but a person is driving it ) and if that player dies or what ever, the spec user must be able to auto/press a key to switch to an other random person
i already have this
Only this isnt fail proof, sometimes you dont spec( see the bridge to sf ) and sometimes you see your self hanging in the air.
Can sombody help me with this?
thanks in advance!
I need a spec system that can be excecuted on any moment( on playerstate change on playerdeath etc )
then you will spec a person in a vehicle( you spec vehicle but a person is driving it ) and if that player dies or what ever, the spec user must be able to auto/press a key to switch to an other random person
i already have this
Код:
new playa = GetRandomPlayer();
KillTimer(timer5[playerid]);
new vehicleid = GetPlayerVehicleID(playa);
TogglePlayerSpectating(playerid, 1);
PlayerSpectateVehicle(playerid,vehicleid);
stock GetRandomPlayer()
{
new yplayer[MAX_SLOTS];
for (new y = 0; y != MAX_PLAYERS; y ++) {
if (IsPlayerConnected(y)) {
yplayer[0] ++;
yplayer[yplayer[0]] = y;
}
}
return yplayer[random(yplayer[0])+1];
}
Can sombody help me with this?
thanks in advance!

