SA-MP Forums Archive
Textdraw - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Textdraw (/showthread.php?tid=575854)



Textdraw - sscarface - 30.05.2015

Hi buddies, I want if a player go to red checkpoint so player gets textdraw.

PHP код:
if(strcmp(cmd"1"true) == 0)
    {
        if(
IsPlayerInDynamicCP(playeridpizzarob))
        {
            new 
money;
            
money GetPlayerMoney(playerid);
            new 
Float:health;
            
GivePlayerHealth(playerid,health);
            if(
money <= 1)
            {
            
SendClientMessage(playeridROJOO,"You don't have enough money.");
            }
            if(
money >= 1)
            {
            
GivePlayerHealth(playerid5.0);
            
GivePlayerMoneyEx(playerid, -1);
            
SendClientMessage(playeridVERDE,"You have purchased an Ice Cream for $1.");
            }
            if(
health == 100.0)
            {
            
SendClientMessage(playeridROJOO,"You have full health already.");
            } 
I think, it's wrong. tell me what should i have to write here in this code?

PHP код:
if(IsPlayerInDynamicCP(playeridpizzarob))
        { 



Re: Textdraw - J0sh... - 30.05.2015

Why don't you just use OnPlayerEnterDynamicCP(playerid, checkpointid)?


Re: Textdraw - sscarface - 30.05.2015

Aight any tut there? or please explain me a little bit with code

Like what should i write after?

PHP код:
public OnPlayerEnterDynamicCP(playeridcheckpointid)
{
    if(
checkpointid == Bell)
    { 
??