SA-MP Forums Archive
Red Portal? - 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: Red Portal? (/showthread.php?tid=272290)



Red Portal? - phil_lendon - 27.07.2011

I have the entry cord and the exit cord with strcmp how can i do red portal thing?


Re: Red Portal? - Shockey HD - 27.07.2011

OnPlayerEnterCheckpoint


Re: Red Portal? - phil_lendon - 27.07.2011

But how do i display "type /rob"


Re: Red Portal? - Sasino97 - 27.07.2011

Quote:
Originally Posted by phil_lendon
Посмотреть сообщение
But how do i display "type /rob"
Create3DTextLabel(text[], color, Float:X, Float:Y, Float:Z, FloatrawDistance, virtualworld, testLOS); // The smile appears because there is Float: DrawDistance ( : D )

Do with the command /rob:

pawn Код:
if(IsPlayerInCheckpoint(playerid) && PlayerToPoint(playerid, X, Y, Z) < 5) //Change x y and z to the pos of  the checkpoint
{
    new money = /*Minimum Ammount*/ + random(/*Maximum Ammount*/);
    GivePlayerMoney(playerid, money);
    SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid) + 1);
    PlayCrimeReportForPlayer(playerid, playerid, 5); //This is used to hear the sound report of the cops, like in GTA:SA
}



Re: Red Portal? - phil_lendon - 27.07.2011

error 029: invalid expression, assumed zero
error 001: expected token: ";", but found ")"
error 001: expected token: ",", but found "-identifier-"
fatal error 107: too many error messages on one line

for the /rob command part, any help?


Re: Red Portal? - Sasino97 - 27.07.2011

Quote:
Originally Posted by phil_lendon
Посмотреть сообщение
error 029: invalid expression, assumed zero
error 001: expected token: ";", but found ")"
error 001: expected token: ",", but found "-identifier-"
fatal error 107: too many error messages on one line

for the /rob command part, any help?
pawn Код:
if(strcmp(cmd, "/rob", true) == 0)
{
    if(IsPlayerInCheckpoint(playerid) && PlayerToPoint(playerid, X, Y, Z) < 5)
    {
        //code
    }
}