18.03.2011, 07:18
This is what i did and it does not work=\
public OnPlayerSpawn(playerid)
{
if (Hspawn[playerid] == 1)
{
if(GetPlayerMoney(playerid) > 100)
{
Hspawn[playerid] = 0
SetPlayerHealth(playerid, 50.5);
SetPlayerCameraPos(playerid, 1190.1182,-1323.4784,13.566;
SetPlayerCameraLookAt(playerid, 1178.7699,-1323.2892,14.1365);
TogglePlayerControllable(playerid, true);
SendClientMessage(playerid,0xDD000096,"You spawned at the Los Santos hospital.");
SendClientMessage(playerid,0xFFFFFF96,"|-----------------------------------|");
SendClientMessage(playerid,0xDD000096,"Your medical bill cost: 100$");
GivePlayerMoney(playerid, -100);
return 1;
}
}
return 1;
}
foward SpawnPlayerToHospital(playerid);
public SpawnPlayerToHospital(playerid);
{
TogglePlayerControllable(playerid, false);
SetPlayerPos(playerid,1176.6060,-1323.7875,14.0296);
SetCameraBehindPlayer(playerid);
}
public OnPlayerSpawn(playerid)
{
if (Hspawn[playerid] == 1)
{
if(GetPlayerMoney(playerid) > 100)
{
Hspawn[playerid] = 0
SetPlayerHealth(playerid, 50.5);
SetPlayerCameraPos(playerid, 1190.1182,-1323.4784,13.566;
SetPlayerCameraLookAt(playerid, 1178.7699,-1323.2892,14.1365);
TogglePlayerControllable(playerid, true);
SendClientMessage(playerid,0xDD000096,"You spawned at the Los Santos hospital.");
SendClientMessage(playerid,0xFFFFFF96,"|-----------------------------------|");
SendClientMessage(playerid,0xDD000096,"Your medical bill cost: 100$");
GivePlayerMoney(playerid, -100);
return 1;
}
}
return 1;
}
foward SpawnPlayerToHospital(playerid);
public SpawnPlayerToHospital(playerid);
{
TogglePlayerControllable(playerid, false);
SetPlayerPos(playerid,1176.6060,-1323.7875,14.0296);
SetCameraBehindPlayer(playerid);
}