Posts: 238
Threads: 39
Joined: Apr 2012
Reputation:
0
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?
Posts: 201
Threads: 39
Joined: Oct 2011
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.
Posts: 238
Threads: 39
Joined: Apr 2012
Reputation:
0
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