Skripta koju koristim: U Pitanju je EuroProGaming RolePlay http://balkan-samp.com/forum/index.php?topic=59072.0
Detaljan opis problema: Ovako,pokusavam da napravim da se pozcija igraca sejvira kad izadje sa servera, pa onda kad udje da se stvori tu.Meni radi sejviranje pozicije,ali drugi igrac koji udje kad ja izadjem stvori se na mojoj poziciji (Evo Primera🙂
Igrac Pica_Num ID:0 ulazi na server i izlazi i pozicja mu se sejvira.
Igrac Kosta_Bot ID:0 ulazi na server i stvara se na poziciji Pica_Numa.!
Dio skripte://
Neke slike/video za lakse dobivanje pomoci(neobavezno)://
[POMOC] SavePlayerPos kad se Reloguje
751
pregleda
18
postova
17. Feb. 2013.
#include
#include
new
Float: PosX[ MAX_PLAYERS ],
Float: PosY[ MAX_PLAYERS ],
Float: PosZ[ MAX_PLAYERS ],
Float: Angle[ MAX_PLAYERS ],
Interior[ MAX_PLAYERS ],
VirtualWorld[ MAX_PLAYERS ]
;
stock user_ini_file(playerid)
{
new
string[ 128 ],
user_name[ MAX_PLAYER_NAME ]
;
GetPlayerName( playerid, user_name, MAX_PLAYER_NAME );
format( string, sizeof ( string ), "%s.ini", user_name );
/* scriptfiles directory */
return
string;
}
forward @load_user_position( playerid, name[], value[] );
@load_user_position( playerid, name[], value[] )
{
INI_Float( "PositionX", PosX[ playerid ] );
INI_Float( "PositionY", PosY[ playerid ] );
INI_Float( "PositionZ", PosZ[ playerid ] );
INI_Float( "Angle", Angle[ playerid ] );
INI_Int( "Interior", Interior[ playerid ] );
INI_Int( "VirtualWorld", VirtualWorld[ playerid ] );
return ( 1 );
}
public OnPlayerDisconnect( playerid, reason )
{
GetPlayerPos( playerid, PosX[ playerid ], PosY[ playerid ], PosZ[ playerid ] );
GetPlayerFacingAngle( playerid, Angle[ playerid ] );
new INI:File = INI_Open( user_ini_file( playerid ) );
INI_SetTag( File, "position" );
INI_WriteFloat( File, "PositionX", PosX[ playerid ] );
INI_WriteFloat( File, "PositionY", PosY[ playerid ] );
INI_WriteFloat( File, "PositionZ", PosZ[ playerid ] );
INI_WriteFloat( File, "Angle", Angle[ playerid ] );
INI_WriteInt( File, "Interior", GetPlayerInterior( playerid ) );
INI_WriteInt( File, "VirtualWorld", GetPlayerVirtualWorld( playerid ) );
INI_Close( File );
return ( 1 );
}
public OnPlayerConnect( playerid )
{
PosX[ playerid ] = 0;
PosY[ playerid ] = 0;
PosZ[ playerid ] = 0;
Angle[ playerid ] = 0;
Interior[ playerid ] = 0;
VirtualWorld[ playerid ] = 0;
INI_ParseFile( user_ini_file( playerid ), "load_user_%s", .bExtra = true, .extra = playerid );
return ( 1 );
}
public OnPlayerSpawn( playerid )
{
if ( PosX[ playerid ] != 0 && PosY[ playerid ] != 0 && PosZ[ playerid ] != 0 )
{
SetPlayerPos( playerid, PosX[ playerid ], PosY[ playerid ], PosZ[ playerid ] );
SetPlayerFacingAngle( playerid, Angle[ playerid ] );
SetPlayerInterior( playerid, Interior[ playerid ] );
SetPlayerVirtualWorld( playerid, VirtualWorld[ playerid ] );
SendClientMessage( playerid, -1, "welcome to your last position" );
}
return ( 1 );
}Evo Pogledaj koliko ja vidim radjeno je sa playerid
18. Feb. 2013.
pod onplayerdisconect
pod loaduser_....
pod enum pInfo
i pod onplayerspawn stavis ovo
sad naravno ako imasu onplayerspawn pjailed pod if ovo stavljas ovo pod else ako je slobodan ..
INI_WriteFloat(File,"PosX",x);
INI_WriteFloat(File,"PosY",y);
INI_WriteFloat(File,"PosZ",z);pod loaduser_....
INI_Int("PosX",PlayerInfo);
INI_Int("PosY",PlayerInfo);
INI_Int("PosZ",PlayerInfo);pod enum pInfo
pX,
pY,
pZ,i pod onplayerspawn stavis ovo
new x = PlayerInfo;
new y = PlayerInfo;
new z = PlayerInfo;
SetPlayerPos(playerid, x,y,z);sad naravno ako imasu onplayerspawn pjailed pod if ovo stavljas ovo pod else ako je slobodan ..
18. Feb. 2013.
Ne radi mozda je do toga posto u sripti nista nije radjeno u YSI ja ti kazem bolje pogledaj skriptu pa mi reci kako jer kad bi video mozda bi mi tacno rekao inace dobijam ove erore
C:\Documents and Settings\Nikola\Desktop\SAMP 0.3x\pawno\include\YSI\y_amx.inc(365) : warning 219: local variable "base" shadows a variable at a preceding level
C:\Documents and Settings\Nikola\Desktop\SAMP 0.3x\pawno\include\YSI\y_amx.inc(413) : warning 219: local variable "base" shadows a variable at a preceding level
C:\Documents and Settings\Nikola\Desktop\SAMP 0.3x\pawno\include\YSI\y_amx.inc(648) : warning 219: local variable "base" shadows a variable at a preceding level
C:\Documents and Settings\Nikola\Desktop\SAMP 0.3x\pawno\include\YSI\y_ini.inc(1342) : warning 219: local variable "temp" shadows a variable at a preceding level
C:\Documents and Settings\Nikola\Desktop\SAMP 0.3x\gamemodes\BURP2.pwn(270) : error 017: undefined symbol "PlayerInfo"
C:\Documents and Settings\Nikola\Desktop\SAMP 0.3x\gamemodes\BURP2.pwn(271) : error 017: undefined symbol "PlayerInfo"
C:\Documents and Settings\Nikola\Desktop\SAMP 0.3x\gamemodes\BURP2.pwn(272) : error 017: undefined symbol "PlayerInfo"
C:\Documents and Settings\Nikola\Desktop\SAMP 0.3x\gamemodes\BURP2.pwn(2851) : error 001: expected token: "}", but found "-identifier-"
C:\Documents and Settings\Nikola\Desktop\SAMP 0.3x\gamemodes\BURP2.pwn(3008) : error 010: invalid function or declaration
C:\Documents and Settings\Nikola\Desktop\SAMP 0.3x\gamemodes\BURP2.pwn(4314) : error 017: undefined symbol "pSpol"
C:\Documents and Settings\Nikola\Desktop\SAMP 0.3x\gamemodes\BURP2.pwn(4315) : error 017: undefined symbol "pSpol"
C:\Documents and Settings\Nikola\Desktop\SAMP 0.3x\gamemodes\BURP2.pwn(4316) : error 017: undefined symbol "pGodine"
C:\Documents and Settings\Nikola\Desktop\SAMP 0.3x\gamemodes\BURP2.pwn(4317) : error 017: undefined symbol "pPnumber"
C:\Documents and Settings\Nikola\Desktop\SAMP 0.3x\gamemodes\BURP2.pwn(4325) : error 017: undefined symbol "pPhoneBook"
C:\Documents and Settings\Nikola\Desktop\SAMP 0.3x\gamemodes\BURP2.pwn(4348) : error 017: undefined symbol "pHeadValue"
C:\Documents and Settings\Nikola\Desktop\SAMP 0.3x\gamemodes\BURP2.pwn(4356) : error 017: undefined symbol "pMember"
C:\Documents and Settings\Nikola\Desktop\SAMP 0.3x\gamemodes\BURP2.pwn(4360) : error 017: undefined symbol "pHeadValue"
C:\Documents and Settings\Nikola\Desktop\SAMP 0.3x\gamemodes\BURP2.pwn(4507) : error 017: undefined symbol "pPrikazaniStatsi"
C:\Documents and Settings\Nikola\Desktop\SAMP 0.3x\gamemodes\BURP2.pwn(4508) : error 017: undefined symbol "pStats2"
C:\Documents and Settings\Nikola\Desktop\SAMP 0.3x\gamemodes\BURP2.pwn(4509) : error 017: undefined symbol "pStats3"
C:\Documents and Settings\Nikola\Desktop\SAMP 0.3x\gamemodes\BURP2.pwn(4510) : error 017: undefined symbol "pStats4"
C:\Documents and Settings\Nikola\Desktop\SAMP 0.3x\gamemodes\BURP2.pwn(4628) : error 017: undefined symbol "pLevel"
C:\Documents and Settings\Nikola\Desktop\SAMP 0.3x\gamemodes\BURP2.pwn(4655) : error 017: undefined symbol "pLeader"
C:\Documents and Settings\Nikola\Desktop\SAMP 0.3x\gamemodes\BURP2.pwn(4666) : error 017: undefined symbol "pLeader"
C:\Documents and Settings\Nikola\Desktop\SAMP 0.3x\gamemodes\BURP2.pwn(4677) : error 017: undefined symbol "pLeader"
C:\Documents and Settings\Nikola\Desktop\SAMP 0.3x\gamemodes\BURP2.pwn(4687) : error 017: undefined symbol "pMember"
C:\Documents and Settings\Nikola\Desktop\SAMP 0.3x\gamemodes\BURP2.pwn(4692) : error 017: undefined symbol "pLeader"
C:\Documents and Settings\Nikola\Desktop\SAMP 0.3x\gamemodes\BURP2.pwn(4702) : error 017: undefined symbol "pLeader"
C:\Documents and Settings\Nikola\Desktop\SAMP 0.3x\gamemodes\BURP2.pwn(4703) : error 017: undefined symbol "pMember"
C:\Documents and Settings\Nikola\Desktop\SAMP 0.3x\gamemodes\BURP2.pwn(4720) : error 017: undefined symbol "pLeader"Morate biti prijavljeni da biste odgovorili na ovu temu.
Prijava