TextDraw
#1

Hello guys, tell me please how to make textdraw on checkpoints
Reply
#2

define it
new Text:check[1];

Code:
       Check[0] = TextDrawCreate(132.000000, 147.125000, "box");
	TextDrawLetterSize(Check[0], 0.000000, 21.299993);
	TextDrawTextSize(Check[0], 534.500000, 0.000000);
	TextDrawAlignment(Check[0], 1);
	TextDrawColor(Check[0], -1);
	TextDrawUseBox(Check[0], 1);
	TextDrawBoxColor(Check[0], 95);
	TextDrawSetShadow(Check[0], 0);
	TextDrawSetOutline(Check[0], 0);
	TextDrawBackgroundColor(Check[0], 255);
	TextDrawFont(Check[0], 1);
	TextDrawSetProportional(Check[0], 1);
	TextDrawSetShadow(Check[0], 0);
This how you can make a textdraw

Code:
public OnPlayerEnterCheckpoint(playerid)
{
     if(GetPVarInt(playerid,"Checkpoint") != 0)
	{
        TextDrawShowForPlayer(playerid, Check[0]);
        }
      DisablePlayerCheckpoint(playerid);
      return 1;
}
Reply
#3

I will make and I tell you if it work. Thx
Reply
#4

I have a problem
Code:
public OnPlayerEnterRaceCheckpoint(playerid)
{
	
	if(GetPVarInt(playerid,"Checkpoint") != 0)
	{
      TextDrawShowForPlayer(playerid, Check[0]);
    }
       
		
	new veh = GetPlayerVehicleID(playerid);
    new engine,lights,alarm,doors,bonnet,boot,objective;
    new tmpcar = GetPlayerVehicleID(playerid);
	new ccar = IsPlayerInAnyVehicle(playerid);
	if(CP[playerid] == 99)
	{
	   DisablePlayerCheckpoint(playerid);
	   CP[playerid] = 0;
	}
	else if(CP[playerid] == 100 && ccar && IsAExamen(tmpcar))
	{
		DisablePlayerRaceCheckpoint(playerid);
		SetPlayerRaceCheckpoint(playerid, 0, 1406.2413,-1869.7007,13.1193,1316.4438,-1846.4220,13.1205,4.0);
		
		CP[playerid] = 101;
	}
	else if(CP[playerid] == 101 && ccar && IsAExamen(tmpcar))
	{
		DisablePlayerRaceCheckpoint(playerid);
		SetPlayerRaceCheckpoint(playerid, 0,1316.4438,-1846.4220,13.1205,1326.5155,-1734.6324,13.1191,4.0);
		CP[playerid] = 102;
	}
	else if(CP[playerid] == 102 && ccar && IsAExamen(tmpcar))
	{
		DisablePlayerRaceCheckpoint(playerid);
		SetPlayerRaceCheckpoint(playerid, 0,1326.5155,-1734.6324,13.1191,1456.0908,-1735.3876,13.1186,4.0);
		CP[playerid] = 103;
	}
	else if(CP[playerid] == 103 && ccar && IsAExamen(tmpcar))
	{
		DisablePlayerRaceCheckpoint(playerid);
		SetPlayerRaceCheckpoint(playerid, 0,1456.0908,-1735.3876,13.1186,1606.1890,-1734.8741,13.1186,4.0);
		CP[playerid] = 104;
	}
	else if(CP[playerid] == 104 && ccar && IsAExamen(tmpcar))
	{
		DisablePlayerRaceCheckpoint(playerid);
		SetPlayerRaceCheckpoint(playerid, 0,1606.1890,-1734.8741,13.1186,1691.6324,-1716.7322,13.1186,4.0);
		CP[playerid] = 105;
	}
	else if(CP[playerid] == 105 && ccar && IsAExamen(tmpcar))
	{
		DisablePlayerRaceCheckpoint(playerid);
		SetPlayerRaceCheckpoint(playerid, 0,1691.6324,-1716.7322,13.1186,1704.9835,-1596.0568,13.1056,4.0);
		CP[playerid] = 106;
	}
	else if(CP[playerid] == 106 && ccar && IsAExamen(tmpcar))
	{
		DisablePlayerRaceCheckpoint(playerid);
		SetPlayerRaceCheckpoint(playerid, 0,1704.9835,-1596.0568,13.1056,1815.2859,-1615.4780,13.1205,4.0);
		CP[playerid] = 107;
	}
	else if(CP[playerid] == 107 && ccar && IsAExamen(tmpcar))
	{
		DisablePlayerRaceCheckpoint(playerid);
		SetPlayerRaceCheckpoint(playerid, 0,1815.2859,-1615.4780,13.1205,1819.2350,-1729.8208,13.1186,4.0);
		CP[playerid] = 108;
	}
	else if(CP[playerid] == 108 && ccar && IsAExamen(tmpcar))
	{
		DisablePlayerRaceCheckpoint(playerid);
		SetPlayerRaceCheckpoint(playerid, 0,1819.2350,-1729.8208,13.1186,1815.8597,-1827.4757,13.1499,4.0);
		CP[playerid] = 109;
	}
	else if(CP[playerid] == 109 && ccar && IsAExamen(tmpcar))
	{
		DisablePlayerRaceCheckpoint(playerid);
		SetPlayerRaceCheckpoint(playerid, 0,1815.8597,-1827.4757,13.1499,1687.3196,-1823.9301,13.1186,4.0);
		CP[playerid] = 110;
    }
	else if(CP[playerid] == 110 && ccar && IsAExamen(tmpcar))
	{
		DisablePlayerRaceCheckpoint(playerid);
		SetPlayerRaceCheckpoint(playerid, 0,1687.3196,-1823.9301,13.1186,1619.0602,-1880.4785,13.1567,4.0);
		CP[playerid] = 111;
	}
	else if(CP[playerid] == 111 && ccar && IsAExamen(tmpcar))
	{
		DisablePlayerRaceCheckpoint(playerid);
		SetPlayerRaceCheckpoint(playerid, 1,1619.0602,-1880.4785,13.1567,1619.0602,-1880.4785,13.1567,4.0);
		CP[playerid] = 112;
	}
	else if(CP[playerid] == 112 && ccar && IsAExamen(tmpcar))
	{
	    if(IsPlayerInAnyVehicle(playerid))
		{
            SetVehicleToRespawn(veh);
            vehEngine[veh] = 0;
			GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
    		SetVehicleParamsEx(veh,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
    		SetPVarInt(playerid, "Engine", 0);
        }
		DisablePlayerRaceCheckpoint(playerid);
		PlayerInfo[playerid][pCarLic] = 1;
		PlayerInfo[playerid][pCarLicT] = 320;
		TakingLesson[playerid] = 0;
		new wakaname1[25],str1[128];
		GetPlayerName(playerid,wakaname1,sizeof(wakaname1));
		format(str1,sizeof(str1),"UPDATE users SET `CarLic`='1',`CarLicT`='320' WHERE `name`='%s'",wakaname1);
		mysql_query(SQL,str1);
		SendClientMessage(playerid, COLOR_LIGHTBLUE, "Congratulations, you passed the test.");
		CP[playerid] = 0;
	}
    return 1;
}
and the errors
Code:
saints.pwn(6556) : error 017: undefined symbol "Check"
test.pwn(6556) : warning 215: expression has no effect
test.pwn(6556) : error 001: expected token: ";", but found "]"
test.pwn(6556) : error 029: invalid expression, assumed zero
test.pwn(6556) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
================ READY ================
Reply
#5

Any ideea ?
Reply
#6

Can you show me the line in which error is comming
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)