27.11.2011, 10:49
hello.
I made a simple countdown from 5 till start, butt i want i with sound. I have no idee, butt what i now have does'nt work. Here is my code:
I made a simple countdown from 5 till start, butt i want i with sound. I have no idee, butt what i now have does'nt work. Here is my code:
Код:
forwarding: forward b1(playerid); forward b2(playerid); forward b3(playerid); forward b4(playerid); forward b5(playerid); forward b6(playerid); the countdown public b1(playerid) { PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0); SendClientMessageToAll(COLOR_MBLUE, "[TIMER] {FFFFFF}5..."); GameTextForAll("~b~5...",1000,3); } public b2(playerid) { PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0); SendClientMessageToAll(COLOR_MBLUE, "[TIMER] {FFFFFF}4..."); GameTextForAll("~b~4...",1000,3); } public b3(playerid) { PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0); SendClientMessageToAll(COLOR_MBLUE, "[TIMER] {FFFFFF}3..."); GameTextForAll("~b~3...",1000,3); } public b4(playerid) { PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0); SendClientMessageToAll(COLOR_MBLUE, "[TIMER] {FFFFFF}2..."); GameTextForAll("~b~2...",1000,3); } public b5(playerid) { PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0); SendClientMessageToAll(COLOR_MBLUE, "[TIMER] {FFFFFF}1..."); GameTextForAll("~b~1...",1000,3); } public b6(playerid) { PlayerPlaySound(playerid, 1056, 0.0, 0.0, 10.0); SendClientMessageToAll(COLOR_MBLUE, "[TIMER] {FFFFFF}Start!"); GameTextForAll("~b~Start!",1000,3); } And the command: if (strcmp("/countdown", cmdtext, true) == 0) { SendClientMessageToAll(COLOR_MBLUE, "[INFO]{FFFFFF} Aftellen gestart (5 seconde)"); SetTimer("b1", 1000, false); SetTimer("b2", 2000, false); SetTimer("b3", 3000, false); SetTimer("b4", 4000, false); SetTimer("b5", 5000, false); SetTimer("b6", 6000, false); SetTimer("b7", 6000, false); return 1; }