Need Help xD
#1

In my player class selection script ,the players are standing in only 1 place.
Thats not showing in different places.
I want the players to be in different zones. how to script that ?
Reply
#2

Add this to your OnPlayerRequestClass
pawn Код:
switch (classid)
{
case 0:
{
SetPlayerPos(playerid, X, Y, Z);
}
case 1:
{
SetPlayerPos(playerid, X, Y, Z);
}
case 2:
{
SetPlayerPos(playerid, X, Y, Z);
}
Replace X, Y and Z with the coordinates you want to add to the class request.
Reply
#3

what he said, but with additional code in each case.
SetPlayerPos(playerid,x,y,z);
SetPlayerFacingAngle(playerid,angle);
SetPlayerCameraPos(playerid,cx,cy,cz);
SetPlayerCameraLookAt(playerid,cx,cy,cz);
Reply
#4

when i add this on "OnPlayerRequestClass"
It shows like this..
pawn Код:
C:\Documents and Settings\Ironboy\Desktop\Windows server\gamemodes\Paradise_City.pwn(157) : error 017: undefined symbol "X"
C:\Documents and Settings\Ironboy\Desktop\Windows server\gamemodes\Paradise_City.pwn(161) : error 017: undefined symbol "X"
C:\Documents and Settings\Ironboy\Desktop\Windows server\gamemodes\Paradise_City.pwn(165) : error 017: undefined symbol "X"
C:\Documents and Settings\Ironboy\Desktop\Windows server\gamemodes\Paradise_City.pwn(169) : error 002: only a single statement (or expression) can follow each "case"
C:\Documents and Settings\Ironboy\Desktop\Windows server\gamemodes\Paradise_City.pwn(169) : error 004: function "OnGameModeInit" is not implemented
C:\Documents and Settings\Ironboy\Desktop\Windows server\gamemodes\Paradise_City.pwn(1039) : warning 225: unreachable code
C:\Documents and Settings\Ironboy\Desktop\Windows server\gamemodes\Paradise_City.pwn(1039) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Ironboy\Desktop\Windows server\gamemodes\Paradise_City.pwn(1039) : error 004: function "OnPlayerDisconnect" is not implemented
C:\Documents and Settings\Ironboy\Desktop\Windows server\gamemodes\Paradise_City.pwn(1045) : error 017: undefined symbol "reason"
C:\Documents and Settings\Ironboy\Desktop\Windows server\gamemodes\Paradise_City.pwn(1055) : warning 225: unreachable code
C:\Documents and Settings\Ironboy\Desktop\Windows server\gamemodes\Paradise_City.pwn(1055) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Ironboy\Desktop\Windows server\gamemodes\Paradise_City.pwn(1055) : error 004: function "OnPlayerUpdate" is not implemented
C:\Documents and Settings\Ironboy\Desktop\Windows server\gamemodes\Paradise_City.pwn(1059) : warning 225: unreachable code
C:\Documents and Settings\Ironboy\Desktop\Windows server\gamemodes\Paradise_City.pwn(1059) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Ironboy\Desktop\Windows server\gamemodes\Paradise_City.pwn(1059) : error 004: function "OnPlayerCommandText" is not implemented
C:\Documents and Settings\Ironboy\Desktop\Windows server\gamemodes\Paradise_City.pwn(1062) : error 017: undefined symbol "cmdtext"
C:\Documents and Settings\Ironboy\Desktop\Windows server\gamemodes\Paradise_City.pwn(1067) : error 017: undefined symbol "cmdtext"
C:\Documents and Settings\Ironboy\Desktop\Windows server\gamemodes\Paradise_City.pwn(1100) : error 017: undefined symbol "cmdtext"
C:\Documents and Settings\Ironboy\Desktop\Windows server\gamemodes\Paradise_City.pwn(1120) : error 017: undefined symbol "cmdtext"
C:\Documents and Settings\Ironboy\Desktop\Windows server\gamemodes\Paradise_City.pwn(1127) : error 017: undefined symbol "cmdtext"
C:\Documents and Settings\Ironboy\Desktop\Windows server\gamemodes\Paradise_City.pwn(1132) : error 017: undefined symbol "cmdtext"
C:\Documents and Settings\Ironboy\Desktop\Windows server\gamemodes\Paradise_City.pwn(1140) : error 017: undefined symbol "cmdtext"
C:\Documents and Settings\Ironboy\Desktop\Windows server\gamemodes\Paradise_City.pwn(1149) : error 017: undefined symbol "cmdtext"
C:\Documents and Settings\Ironboy\Desktop\Windows server\gamemodes\Paradise_City.pwn(1155) : error 017: undefined symbol "cmdtext"
C:\Documents and Settings\Ironboy\Desktop\Windows server\gamemodes\Paradise_City.pwn(1161) : error 017: undefined symbol "cmdtext"
C:\Documents and Settings\Ironboy\Desktop\Windows server\gamemodes\Paradise_City.pwn(1167) : error 017: undefined symbol "cmdtext"
C:\Documents and Settings\Ironboy\Desktop\Windows server\gamemodes\Paradise_City.pwn(1172) : error 017: undefined symbol "cmdtext"
C:\Documents and Settings\Ironboy\Desktop\Windows server\gamemodes\Paradise_City.pwn(1178) : error 017: undefined symbol "cmdtext"
C:\Documents and Settings\Ironboy\Desktop\Windows server\gamemodes\Paradise_City.pwn(1185) : error 017: undefined symbol "cmdtext"

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


26 Errors.
Reply
#5

After that i added
return 1;
}
that tiime error decreased to 4
pawn Код:
C:\Documents and Settings\Ironboy\Desktop\Windows server\gamemodes\Paradise_City.pwn(157) : error 017: undefined symbol "X"
C:\Documents and Settings\Ironboy\Desktop\Windows server\gamemodes\Paradise_City.pwn(161) : error 017: undefined symbol "X"
C:\Documents and Settings\Ironboy\Desktop\Windows server\gamemodes\Paradise_City.pwn(165) : error 017: undefined symbol "X"
C:\Documents and Settings\Ironboy\Desktop\Windows server\gamemodes\Paradise_City.pwn(167) : error 002: only a single statement (or expression) can follow each "case"
C:\Documents and Settings\Ironboy\Desktop\Windows server\gamemodes\Paradise_City.pwn(167) : warning 215: expression has no effect
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
Reply
#6

you need to add the coords instead of "x y z", etc..
additionally you need to write:
case 0:
{
CODE
}
case 1:
{
CODE
}
case 2:
{
CODE
}
Reply
#7

help me with complete details plz
Reply
#8

join your server /save pos1 /save pos2 /save pos3
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    switch (classid)
    {
        case 0:
        {
            SetPlayerPos(playerid, x, y, z);
            SetPlayerFacingAngle(playerid, angle);
            SetPlayerCameraPos(playerid, xcamera, ycamera, zcamera);
            SetPlayerCameraLookAt(playerid, x, y, z);
        }
        case 1:
        {
            SetPlayerPos(playerid, x2, y2, z2);
            SetPlayerFacingAngle(playerid, angle2);
            SetPlayerCameraPos(playerid, xcamera2, ycamera2, zcamera2);
            SetPlayerCameraLookAt(playerid, x2, y2, z2);
        }
        case 2:
        {
            SetPlayerPos(playerid, x3, y3, z3);
            SetPlayerFacingAngle(playerid, angle3);
            SetPlayerCameraPos(playerid, xcamera3, ycamera3, zcamera3);
            SetPlayerCameraLookAt(playerid, x3, y3, z3);
        }
    }
    return 1;
}
go to "Documents/GTA San Anderas User Fules/SA-MP/savedpositions.txt", and open it
replace X with the second number after "AddPlayerClass", Y with the thrid, Z with the fourth and angle with the fifth..

camera with the coordinates for the camera positions.. (/save them ingame, too)
Reply
#9

Ok Thank You
Reply
#10

Quote:
Originally Posted by Ironboy
Посмотреть сообщение
Ok Thank You
O My God..
I wrote you the same thing.
Were you asleep when you red my message?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)