Save and load player's position in/to RAM
#5

Quote:
Originally Posted by Adytza.
Посмотреть сообщение
pawn Код:
new Float:TutX[MAX_PLAYERS],Float:TutY[MAX_PLAYERS],Float:TutZ[MAX_PLAYERS],Float:TutA[MAX_PLAYERS];
This should work
pawn Код:
if(Tut[playerid]==1)
            {
                new Float:xPos, Float:yPos, Float:zPos, Float:Angle;
                GetPlayerPos(playerid,xPos,yPos,zPos);
                GetPlayerFacingAngle(playerid,Angle);
                new Float:TutX[MAX_PLAYERS],Float:TutY[MAX_PLAYERS],Float:TutZ[MAX_PLAYERS],Float:TutA[MAX_PLAYERS];
                TutX[playerid]=xPos;
                TutY[playerid]=YPos;
                TutZ[playerid]=zPos;
                TutA[playerid]=Angle;
                if(TutTime[playerid]==0)
                {
                    SetPlayerInterior(playerid,0);
                    SetPlayerPos(playerid,55.55,55.55,55.55);
                    SetPlayerCameraPos(playerid,66.66,66.66,66);
                    SetPlayerCameraLookAt(playerid,-99.9877,-5678.1234,2.0367);
                    ShowPlayerDialog(playerid,59,DIALOG_STYLE_MSGBOX,"Tutorial","My message","OK","");
                }
                if(TutTime[playerid]==15)
                {
                    SetPlayerPos(playerid,66.66,66.66,66.66);
                    SetPlayerCameraPos(playerid,77.77,77.77,77);
                    SetPlayerCameraLookAt(playerid,-99.9877,-5678.1234,2.0367);
                    ShowPlayerDialog(playerid,61,DIALOG_STYLE_MSGBOX,"Tutorial","My message","OK","");
                }
                if(TutTime[playerid]==25)
                {
                    SetPlayerPos(playerid,77.77,77.77,77.77);
                    SetPlayerCameraPos(playerid,88.88,88.88,88);
                    SetPlayerCameraLookAt(playerid,-99.9877,-5678.1234,2.0367);
                    ShowPlayerDialog(playerid,62,DIALOG_STYLE_MSGBOX,"Tutorial","My message","OK","");
                }
                if(TutTime[playerid]==60)
                {
                    Tut[playerid]=0;
                    SetPlayerPos(playerid,TutX,TutY,TutZ); //2783
                    SetPlayerFacingAngle(playerid,TutA); //2784
                     
                }
                telPos[0][playerid]=TutX;telPos[1][playerid]=TutY; // 2789 sorry forgot to mention, this is anti cheat teleport, in this line telPos[0] must be equal to X coordiante, telPos[1] = Y coordinate

            }

pawn Код:
C:\SAMP\mod1.pwn(2783) : error 035: argument type mismatch (argument 2)
C:\SAMP\mod1.pwn(2784) : error 035: argument type mismatch (argument 2)
C:\SAMP\mod1.pwn(2789) : error 006: must be assigned to an array
C:\SAMP\mod1.pwn(2789) : error 006: must be assigned to an array
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)