SA-MP Forums Archive
/pass command problem - 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: /pass command problem (/showthread.php?tid=657733)



/pass command problem - DavidGravelli - 14.08.2018

This command is not working propertly only the enter thing works.
pawn Код:
CMD:pass(playerid, params[])
{
    if(!IsPlayerInRangeOfPoint(playerid, 2, PhoneStoreEntrance[0], PhoneStoreEntrance[1], PhoneStoreEntrance[2]))
    {

        GetPlayerPos(playerid, pRestorePos[playerid][0], pRestorePos[playerid][1], pRestorePos[playerid][2]);
        GetPlayerFacingAngle(playerid, pRestorePos[playerid][3]);
        pRestorePos[playerid][3] = ((_:pRestorePos[playerid][3]+180) % 360);

        SetPlayerInterior(playerid, 17);
        SetPlayerPos(playerid, -25.884498,-185.868988,1003.546875);
        SetPlayerFacingAngle(playerid, 0);
     }
     else
     {
        SetPlayerPos(playerid, pRestorePos[playerid][0], pRestorePos[playerid][1], pRestorePos[playerid][2]);
        SetPlayerFacingAngle(playerid, pRestorePos[playerid][3]);
        SetPlayerInterior(playerid, 0);
        pRestorePos[playerid][0] = 0.0;
     }
     return 1;
}