New Checkpoint Help.
#1

pawn Код:
case 24:
            {

            SendClientMessage(playerid,0xFFFFFFFF,"[DEBUG]: Checkpoint ID: 24");
            IsInCheckPoint[playerid] = 1;
            TogglePlayerControllable(playerid, false);
            TextDrawShowForPlayer(playerid,buytd[0]);
            SetPlayerPos(playerid,314.2207,-133.4249,999.6016);
            SetPlayerFacingAngle(playerid,271.2125);
            SetCameraBehindPlayer(playerid);

            if(strcmp(text, "1", true))

            {
            SendClientMessage(playerid,0xFFFFFFFF,"This should work");
            }
            return true;
        }
I cant seem to get if(strcmp(text, "1", true)) to Work because its giving me error's I tried text = variable. -> new text[ 254 ]; still no luck
Reply
#2

I believe that it has to be done in OnPlayerText

just do something like PlayerAtCheckpoint[playerid] = 1; when he enter that checkpoint

something like this

OnPlayerText
pawn Код:
if(PlayerAtCheckpoint[playerid] == 1)
    {
        if (strcmp(text,"1",true) == 0)
        {
            SendClientMessage(playerid,0x38FF06FF,"Selection 1");
            PlayerAtCheckpoint[playerid] = 0;
            return 0;
        }
        else if (strcmp(text,"2",true) == 0)
        {
            SendClientMessage(playerid,0x38FF06FF,"Selection 2");
            PlayerAtCheckpoint[playerid] = 0;
            return 0;
        }
        else
        {
            SendClientMessage(playerid,0xE60000FF,"Must select 1 or 2.");
            return 0;
        }
    }
Reply
#3

heh I relised that but thats for the post it will save me time.
Reply
#4

When I type 1 is says Selection 2
When I type 0 is says Selection 1
Reply
#5

Quote:
Originally Posted by M4DKiLLA
When I type 1 is says Selection 2
When I type 0 is says Selection 1
yeah sorry, I hadn't tested it yet, but its fixed now above
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)