New Checkpoint Help. - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: New Checkpoint Help. (
/showthread.php?tid=85306)
New Checkpoint Help. -
6tynine - 06.07.2009
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
Re: New Checkpoint Help. -
happyface - 06.07.2009
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;
}
}
Re: New Checkpoint Help. -
6tynine - 06.07.2009
heh I relised that but thats for the post it will save me time.
Re: New Checkpoint Help. -
6tynine - 06.07.2009
When I type 1 is says Selection 2
When I type 0 is says Selection 1
Re: New Checkpoint Help. -
happyface - 06.07.2009
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