05.03.2010, 20:09
(
Последний раз редактировалось Luka P.; 26.12.2010 в 12:43.
)
[HowTo] Convert Public Enemy LS to 0.3
Feel free to post how to fix something
Hello!Feel free to post how to fix something
Today I was downloaded Public Enemy LS - The Original, and when I was testing it, it worked fine. Then I had modified some things in gamemode, I was going to test it, but when I spawned I was in house. That is not usual because you shall spawn at motel in Los Santos, not house (actually, in trailer). I saw few guys need help to make it work, so heres a little guide. So now, I got a solution for it - saving system is saving
PLlayerInfo[playerid][plPhousekey] instead of PlayerInfo[playerid][pPhousekey] (also for business), i'm not sure why there is two enumerations with saving data, but OK.
As you maybe saw, under OnPlayerConnect there is
pawn Код:
PlayerInfo[playerid][pPhousekey] = 255;
PlayerInfo[playerid][pPbiskey] = 255;
So, this is how it works on not-modified PENLS
You connect to server, register, your current Phousekey value is 255 (not house) because it is initialized under OnPlayerConnect, but when you disconnect it saves plPhousekey which is zero (trailer house's ID), and next time you connect, it spawns you at that trailer.
What you need to do is to add PLlayerInfo[playerid][plPhousekey] and PLlayerInfo[playerid][plPbiskey] under OnPlayerConnect, so it should look like
pawn Код:
public OnPlayerConnect(playerid)
{
....
PLlayerInfo[playerid][plPhousekey] = 255;
PLlayerInfo[playerid][plPbiskey] = 255;
PlayerInfo[playerid][pPhousekey] = 255;
PlayerInfo[playerid][pPbiskey] = 255;
....
return 1;
}
Next step you have to do is to replace OnPlayerUpdate to some other name, lets say OnUpdatePlayer (its not related to houses and business).
You can do it by pressing CTRL+H. In first textbox type OnPlayerUpdate and in second one OnUpdatePlayer.
Now do this
Quote:
Originally Posted by AndryXoX
Add This (by me)
Код:
public OnPlayerSpawn(playerid) { if (gdebug >=1){printf("OnPlayerSpawn Playerid:%d", playerid);} new playername[40]; if (teamcarlock) { TeamLockDoors(playerid); } InitLockDoors(playerid); if(accountplay) { if (gdebug >=1){printf("accountplay");} if (gPlayerAccount[playerid] == 0) { gTeam[playerid] = 0; GameTextForPlayer(playerid, "~w~Welcome.~n~In order to play you need to create an account, type ~n~~r~/regnick (password)~w~ to register", 20000, 3); //SetPlayerInterior(playerid,0); SetPlayerInterior(playerid,3); PlayerInfo[playerid][pInt] = 3; SetPlayerPos(playerid,198.5,162.5,1003.0); // airport PlayJailSound(1153 , 1154, 2000,264.395200, 77.564040, 1001.039000); gPlayerSpawned[playerid] = 1; return 1; } if (gPlayerLogged[playerid] == 0) { gTeam[playerid] = 0; GameTextForPlayer(playerid, "~w~In order to play you need to log in to your account, type ~n~~g~/login (password)~w~ to log in", 20000, 3); //SetPlayerInterior(playerid,0); SetPlayerInterior(playerid,3); PlayerInfo[playerid][pInt] = 3; SetPlayerPos(playerid,198.5,162.5,1003.0); // airport PlayJailSound(1153 , 1154, 2000,264.395200, 77.564040, 1001.039000); gPlayerSpawned[playerid] = 1; return 1; } } if (gPlayerSpawned[playerid] == 1) { gTeam[playerid] = PlayerInfo[playerid][pTeam]; if (gTeam[playerid] == 2 && forceteam && CopCheck(playerid)) { gTeam[playerid] = 3; PlayerInfo[playerid][pTeam] = 3; SetPlayerRandomSpawn(playerid); SendClientMessage(playerid, COLOR_YELLOW, "SERVER: Your are not allowed to be a cop."); } |
Quote:
Originally Posted by AndryXoX
To correct the mission HotWire (checkpoints)
replace and/or add pawn Код:
Remove first /* switch (MissionActive) }/* On the line case 9://Car is waiting first occupent pawn Код:
pawn Код:
On the line case 8: pawn Код:
pawn Код:
pawn Код:
On the line (MissionActive == 9) pawn Код:
pawn Код:
pawn Код:
pawn Код:
pawn Код:
pawn Код:
|
Quote:
Please add to the main post:
Add this to your script: pawn Код:
|
Original topic: http://forum.sa-mp.com/index.php?topic=40910.0