-
.
Qualcuno mi aiuta? çuç SPOILER (clicca per visualizzare)new bool: reloading;
public reload()
{
GameTextForAll("The cannon has been reloaded.",2000,4);
SetObjectPos(obj , 268.89999389648, 1884, 9);
reloading = false;
return 1;
}
public fifteen()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerInRangeOfPoint(i, 500.0, 268.89999389648, 1884, 9))
GameTextForPlayer(i ,"~r~15 secs until launch",2000,4);
if(IsPlayerInRangeOfPoint(i, 500.0, 268.89999389648, 1884, 9))
PlayerPlaySound(i , 3200, 0.0, 0.0, 0.0);
reloading = true;
}
return 1;
}
if (strcmp("/launch", cmdtext, true, 10) == 0){
if(reloading == true)
SendClientMessage(playerid, COLOR_LIGHTBLUE, "The cannon is reloading.. please wait.");
else
SetTimer("reload", 120000, 0);
SetTimer("fifteen", 1000, 0);
SetTimer("ten", 5000, 0);
SetTimer("five", 10000, 0);
SetTimer("four", 11000, 0);
SetTimer("three", 12000, 0);
SetTimer("two", 13000, 0);
SetTimer("one", 14000, 0);
SetTimer("start", 15000, 0);
{
GetPlayerName(playerid, pName, 30);
format(string, 280, "{00CDCD}%s {00FFFF}started the cannon countdown.", pName);
SendClientMessageToAll(COLOR_LIGHTBLUE, string);
}
return 1;
}. -
-Tommy-.
User deleted
per prima cosa guarda come si fa un timer.
e poi guarda SetTimer usato per un timer in generale (vale per tutti)
invece SetTimerEx è per il player.
timerEx
timer. -
.
Si lo so, volevo fare i timer per tutti ma le altre robe solo se sei vicino alla mappa, comunque il problema era nel comando.. . -
-Tommy-.
User deleted
lo credo le parentesi per te sono un optional..le metti a caso :| . -
.
Haha, è che non ho mai capito come funzionano, e non le vedo nel codice.. metto a caso giusto per non farmi dare errori, però non vanno E_E
Beh alla fine non ho capito come aggiustarlo comunque, lol.. dove andrebbe la parentesi? Grazie dell'aiuto comunque. -
.
Vabéh grazie ho fixato dasolo .l. . -
-Tommy-.
User deleted
faccio qualcosa
{
//funzione
}
in alcuni casi come i comandi ci metti return 1;
comando
{
//funzione
return 1;
}.