Hospital System - 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)
+--- Thread: Hospital System (
/showthread.php?tid=346304)
Hospital System -
JustinAn - 27.05.2012
Hey guys, it's about a hospital system, like for example in Roleplay servers they die, it sets their camera pos looking at the hospital, then they have a timer delay then it'll spawn them with 50 health percent I guess?
Could someone send me a code or show me how to do it?
Re: Hospital System -
AdamCooper - 28.05.2012
Open up your game mode CTRL+f and search for OnPlayerDeath
Under it place :
pawn Код:
SetPlayerPos(playerid,X,Y,Z);
SetPlayerFacingAngle(playerid,15.000000);
SetPlayerCameraPos(playerid, X,Y,Z);
SetPlayerCameraLookAt(playerid, X,Y,Z);
SetTimerEx("killtimer",8000,false,"i",playerid);
TogglePlayerControllableEx(playerid,false);
Under OnGameModeInit
pawn Код:
forward killtimer(playerid);
public killtimer(playerid)
{
TogglePlayerControllableEx(playerid,true);
ResetPlayerWeapons(playerid);
SetPlayerHealth(playerid,0.0);
SpawnPlayer(playerid);
Try this.
Re: Hospital System -
JustinAn - 28.05.2012
Thanks I'll try it.
Re: Hospital System -
JustinAn - 30.05.2012
C:\Users\Michael\Desktop\samp03e_svr_win32\gamemod es\test.pwn(306) : error 017: undefined symbol "TogglePlayerControllableEx"
C:\Users\Michael\Desktop\samp03e_svr_win32\gamemod es\test.pwn(432) : error 017: undefined symbol "TogglePlayerControllableEx"
2 Errors
Re: Hospital System -
N0FeaR - 30.05.2012
Quote:
Originally Posted by JustinAn
C:\Users\Michael\Desktop\samp03e_svr_win32\gamemod es\test.pwn(306) : error 017: undefined symbol "TogglePlayerControllableEx"
C:\Users\Michael\Desktop\samp03e_svr_win32\gamemod es\test.pwn(432) : error 017: undefined symbol "TogglePlayerControllableEx"
2 Errors
|
Try Remove Ex, and re-complie
Код:
TogglePlayerControllable
Re: Hospital System -
JustinAn - 30.05.2012
Alright, I'll try it.
Re: Hospital System -
JustinAn - 30.05.2012
Quote:
Originally Posted by N0FeaR
Try Remove Ex, and re-complie
Код:
TogglePlayerControllable
|
Thanks man! It worked.