Textdraw timer help
#1

Guys, I wanted to make a textdraw timer for the command /robstore. I did the following and i dont get anthing on screen like im robbing. check this and tell me what to do.

Код:
new Text:Robbery;
Robbery = TextDrawCreate(305, 245, "Robber in progress. Please wait in checkpoint");
TextDrawFont(Robbery , 1);
TextDrawLetterSize(Robbery , 3.0, 21.0);
TextDrawColor(Robbery , 0xFF0000FF);
TextDrawSetOutline(Robbery , 1);
TextDrawSetProportional(Robbery , 1);
TextDrawSetShadow(Robbery , 1);
and in the command
Код:
if(getCheckpointType(playerid) != CP_BurgerShotMain && getCheckpointType(playerid) != CP_CluckinBellMain &&
	getCheckpointType(playerid) != CP_Ammunation && getCheckpointType(playerid) != CP_GayDarMain &&
	getCheckpointType(playerid) != CP_ZeroMain && getCheckpointType(playerid) != CP_MistysMain &&
	getCheckpointType(playerid) != CP_GYM && getCheckpointType(playerid) != CP_School &&
	getCheckpointType(playerid) != CP_WangCars && getCheckpointType(playerid) != CP_Train &&
	getCheckpointType(playerid) != CP_Barbers && getCheckpointType(playerid) != CP_PizzaMain &&
	getCheckpointType(playerid) != CP_ZipMain && getCheckpointType(playerid) != CP_VictimMain &&
	getCheckpointType(playerid) != CP_BincoMain && getCheckpointType(playerid) != CP_CityHallMain)
	{
	    SendClientMessage(playerid,COLOR_ERROR,"You are not in the checkpoint of anywhere you can rob.");
	    return 1;
	}
	new current_zone = player_zone[playerid];
	new rrand =random(100);
	if(getCheckpointType(playerid) == CP_BurgerShotMain)
	{
	    if(zones[current_zone][zone_name] == zones[116][zone_name] || zones[current_zone][zone_name] == zones[117][zone_name])
	    {
		    if(GarciaBurgerShotRobbedRecently >= 1)
		    {
		        SendClientMessage(playerid,COLOR_ERROR,"The Garcia Burger Shot has been robbed recently.");
		        return 1;
			}
			if(rrand <= 30)
			{
			    SendClientMessage(playerid,COLOR_ERROR,"Garcia Burger Shot robbery failed.");
			    GarciaBurgerShotRobbedRecently =320;
			    return 1;
			}
			GarciaBurgerShotRobbedRecently =320;
   			IncreaseWantedLevel(playerid,4);
			IncreasePlayerScore(playerid,1);
			format(string,sizeof(string),"Robbing Burger Shot.\nFinish Robbery in: %d seconds.\nPolice are on the way.",RobbingGarciaBurgerShot[playerid]);
			SetTimerEx("Robbery",25000,0,"d",playerid); //This line, Is this correct format?
 
			format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob the Garcia Burger Shot! Get To Burger Shot and arrest the suspect.",PlayerName(playerid),playerid);
			SendClientMessageToAllCops(string);

			format(string,sizeof(string),"[ROBBERY] %s(%d) has begun a robbery at Burger Shot ..",PlayerName(playerid),playerid);
			SendClientMessageToAll(COLOR_RED,string);

			format(string,sizeof(string),"4[ROBBERY] %s(%d) has begun a robbery at Burger Shot ..",PlayerName(playerid),playerid);
			IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
			return 1;
		}
Reply
#2

Depends on the function "Robbery". The SetTimerEx is correctly laid but how many parameters does the "Robbery" function have? Also you must show the textdraw for it to appear, not only create it.
Reply
#3

What does show mean?.. sorry, im not a pro.. still learning. so can ya help me
Reply
#4

Quote:
Originally Posted by ponagandlamanoj
Посмотреть сообщение
What does show mean?.. sorry, im not a pro.. still learning. so can ya help me
Show means... show..

https://sampwiki.blast.hk/wiki/TextDrawCreate
NOTES: This function merely CREATES the textdraw, you must use TextDrawShowForPlayer to show it.

https://sampwiki.blast.hk/wiki/TextDrawShowForPlayer
Reply
#5

Unable to get it bro. Any tutorial ya know for this?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)