SA-MP Forums Archive
It dosnt work! - 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: It dosnt work! (/showthread.php?tid=115460)



It dosnt work! - pawelf94 - 24.12.2009

pawn Код:
new gStoredPos[MAX_PLAYERS];

StorePlayerPos(playerid)
{
gStoredPos[playerid] = GetPlayerPos(playerid);
}

SetPlayerPosToStoredPos(playerid)
{
SetPlayerPos(playerid, gStoredPos[playerid]);
}

StorePlayerPos(playerid);
SetPlayerPosToStoredPos(playerid);
why is this not working ??


Re: Store Player Position is not working :/ - pawelf94 - 24.12.2009

im getting this

Код:
C:\DOCUME~1\Pawel\Pulpit\DMSERV~1\GAMEMO~1\lvdm21.pwn(83) : warning 202: number of arguments does not match definition
C:\DOCUME~1\Pawel\Pulpit\DMSERV~1\GAMEMO~1\lvdm21.pwn(83) : warning 202: number of arguments does not match definition
C:\DOCUME~1\Pawel\Pulpit\DMSERV~1\GAMEMO~1\lvdm21.pwn(83) : warning 202: number of arguments does not match definition



Re: Store Player Position is not working :/ - [HiC]TheKiller - 24.12.2009

pawn Код:
new Float:gStoredPos[MAX_PLAYERS][3];

StorePlayerPos(playerid)
{
  GetPlayerPos(playerid, gStoredPos[playerid][0], gStoredPos[playerid][1], gStoredPos[playerid][2]);
}

SetPlayerPosToStoredPos(playerid)
{
  SetPlayerPos(playerid, gStoredPos[playerid][0], gStoredPos[playerid][1], gStoredPos[playerid][2]);
}



Re: Store Player Position is not working :/ - pawelf94 - 24.12.2009

i used script at the top and in my spawn i did:

pawn Код:
public OnPlayerSpawn(playerid)
{
    if(ONWG[playerid] == 1)
    {
        SetPlayerPosToStoredPos(playerid);
        SetPlayerSkinToStoredSkin(playerid);
        ONWG[playerid] = 0;
        SetPlayerInterior(playerid,15);
    }
  PlayerPlaySound(playerid, 1069, 0.0, 0.0, 0.0);
    SetPlayerInterior(playerid,0);
    SetPlayerRandomSpawn(playerid);
    SetPlayerVirtualWorld(playerid, 0);
    return 1;
}
the skin gets set but the position has no effect the guy goes to random spawn even that he is ON‌WG = 1


Re: Store Player Position is not working :/ - pawelf94 - 24.12.2009

i tried this aswell

pawn Код:
SetPlayerPos(playerid, gStoredPos[playerid][0], gStoredPos[playerid][1], gStoredPos[playerid][2]);
and the effect is the same :/ ONWG is 1 for 100% because the skin is changing etc but not the position


Re: Store Player Position is not working :/ - MadeMan - 24.12.2009

When do you store the pos?


Re: Store Player Position is not working :/ - pawelf94 - 24.12.2009

when you type /dolacz and when you die in the position from the command u should get the position back


Re: StorePlayerPos(playerid); NOT WORKING :/ IT HAS NO EFFECT - pawelf94 - 24.12.2009

is the any other way to store and load player position because this one its done fine but its not working :/