Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- new Contar = 5;
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(!strcmp(cmdtext,"/contagem", true))
- {
- StartCount(playerid);
- return 1;
- }
- return 0;
- }
- forward StartCount(p);
- public StartCount(p)
- {
- static
- Float: _X,
- Float: _Y,
- Float: _Z,
- _str[100]
- ;
- GetPlayerPos(p, Float:_X, Float:_Y, Float:_Z);
- format(_str, sizeof(_str),"%d", Contar);
- if(Contar == 0)
- {
- for(new i; i <= MAX_PLAYERS; ++i)
- {
- if(IsPlayerConnected(i))
- {
- if(IsPlayerInRangeOfPoint(i, 5.0,Float:_X, Float:_Y, Float:_Z))
- {
- GameTextForPlayer(i, "~g~Go Go Go!",2500, 3);
- }
- }
- }
- return Contar=5, true;
- }
- for(new i; i <= MAX_PLAYERS; ++i)
- {
- if(IsPlayerConnected(i))
- {
- if(IsPlayerInRangeOfPoint(i, 5.0,Float:_X, Float:_Y, Float:_Z))
- {
- GameTextForPlayer(i, _str,2500, 3);
- SetTimerEx("StartCount", 1000, false, "id",i,Contar);
- }
- }
- }
- return Contar--;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement