17.12.2009, 11:54
hello!
i have a new years countdown:
awhen the countdown reaches zero, i want it to play the sound as in the script, but it wont, when i compile, i get an error saying (undefined symbol "plqayerid")
why, please help!!
i have a new years countdown:
Код:
#define FILTERSCRIPT #include <a_samp> #include <a_players> new counter; new countTimer; forward timer(); #if defined FILTERSCRIPT public OnFilterScriptInit() { counter = 0; return 1; } public OnFilterScriptExit() { counter = 0; return 1; } #else main() { print("\n------------------------------------------"); print(" NewYearCountdown Script"); print("------------------------------------------\n"); } #endif public OnPlayerConnect(playerid) { SendClientMessage(playerid, 0xFF00FF,"Welcome to the New Year's Party!"); return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if(!strcmp(cmdtext, "/count", true) || !strcmp(cmdtext, "/countdown", true)) { if(counter != 0) return SendClientMessage(playerid, 0xFFFF00FF, "The new-year countdown is already running...print what till next year!"); counter = 60; countTimer = SetTimer("timer", 1000, true); return true; } return 0; } public timer() { if(counter > 0) { new string[3]; format(string, sizeof(string), "%d", counter); GameTextForAll(string, 500, 3); } else { GameTextForAll("HAPPY NEW YEAR 2010!!!", 50000, 5); PlayerPlaySound(playerid, 1076, 0.0, 0.0, 0.0); counter = 0; KillTimer(countTimer); } counter--; return true; }
why, please help!!