SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 16/05/2015, 03:01 PM   #1
Sn4ke2
Huge Clucker
 
Join Date: Dec 2014
Posts: 333
Reputation: 32
Default TextDraw

Hello guys, tell me please how to make textdraw on checkpoints
Sn4ke2 is offline   Reply With Quote
Old 16/05/2015, 04:02 PM   #2
XaibBaba
Huge Clucker
 
XaibBaba's Avatar
 
Join Date: Jun 2014
Location: Pakistan
Posts: 235
Reputation: 12
Default Re: TextDraw

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;
}
__________________
Looking for a light RP server?

Add us in your fav!
Alrium Roleplay Live Yo' Lyf
XaibBaba is offline   Reply With Quote
Old 16/05/2015, 06:04 PM   #3
Sn4ke2
Huge Clucker
 
Join Date: Dec 2014
Posts: 333
Reputation: 32
Default Re: TextDraw

I will make and I tell you if it work. Thx
Sn4ke2 is offline   Reply With Quote
Old 16/05/2015, 07:02 PM   #4
Sn4ke2
Huge Clucker
 
Join Date: Dec 2014
Posts: 333
Reputation: 32
Default Re: TextDraw

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 (c) 1997-2006, ITB CompuPhase


4 Errors.
================ READY ================
Sn4ke2 is offline   Reply With Quote
Old 17/05/2015, 09:59 AM   #5
Sn4ke2
Huge Clucker
 
Join Date: Dec 2014
Posts: 333
Reputation: 32
Default Re: TextDraw

Any ideea ?
Sn4ke2 is offline   Reply With Quote
Old 17/05/2015, 10:52 AM   #6
XaibBaba
Huge Clucker
 
XaibBaba's Avatar
 
Join Date: Jun 2014
Location: Pakistan
Posts: 235
Reputation: 12
Default Re: TextDraw

Can you show me the line in which error is comming
__________________
Looking for a light RP server?

Add us in your fav!
Alrium Roleplay Live Yo' Lyf
XaibBaba is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Tutorial] Making a Health/armour textdraw! (Global textdraw) -Rebel Son- Tutorials 22 21/02/2020 01:27 AM
Moving a textdraw on the y-axis doesn't work. (TextDraw Editor) AndySedeyn Scripting Help 1 14/06/2014 02:50 PM
[FilterScript] [FS] TextDraw editor 0.6 - Multiple textdraw support, for proffesional textdraws Zamaroht Filterscripts 369 20/01/2013 02:46 PM
[Tutorial] --: Creating Textdraw's In The Easiest Way :-- [Helpful for textdraw creators] Nirzor Tutorials 15 04/10/2012 12:32 PM


All times are GMT. The time now is 04:28 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.