Hospital System
#1

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?
Reply
#2

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.
Reply
#3

Thanks I'll try it.
Reply
#4

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
Reply
#5

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
Reply
#6

Alright, I'll try it.
Reply
#7

Quote:
Originally Posted by N0FeaR
Посмотреть сообщение
Try Remove Ex, and re-complie
Код:
TogglePlayerControllable
Thanks man! It worked.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)