25.09.2013, 07:04
this on top of script
The timer
forward RaceTimer(numero);
And where the player joins the race add SEE BELOW
Good luck
pawn Код:
new subscribeds;
new racers[MAX_PLAYERS]=-1;
forward RaceTimer(numero);
pawn Код:
public RaceTimer(numero){
new str[50];
new Float:pX,Float:pY,Float:pZ;
if(numero>0){
for(new i = 0; i < subscribeds; i++){
format(str, sizeof (str), "~r~[][] %d[][]", numero);
if (IsPlayerConnected(racers[i])){ // the racers is a variable that check if the player is in a race. thats up to you change.
GameTextForPlayer(racers[i], str, 1200, 3); // the racers is a variable that check if the player is in a race. thats up to you change.
if(numero<6){
GetPlayerPos(i,pX,pY,pZ);
PlayerPlaySound(i,1056,pX,pY,pZ);
}
}
}
numero--;
SetTimerEx("CD",1000,0,"i",numero);
}
else{
for(new i = 0; i < subscribeds; i++){
if (IsPlayerConnected(racers[i])){ // the racers is a variable that check if the player is in a race. thats up to you change.
GameTextForPlayer(racers[i], "~g~[][][] GO!! [][][]!!!", 1200, 3); // the racers is a variable that check if the player is in a race. thats up to you change.
PlayerPlaySound(i,1057,pX,pY,pZ);
}
}
}
return 1;
}
pawn Код:
racers[subscribeds]=playerid;