Hey everyone
#1

could someone make me a accept-death system for my script because i am not that advanced so that would be grate just post below if you need any more details
Reply
#2

This is the wrong forum to post this. Use the script request thread, or you can use the 'Search' function to find something like that.

http://forum.sa-mp.com/search.php
Reply
#3

i have tried but they dont work in my script i have one in my script it does not work tho so if somebody could come on teamviewer to help me out with it it would be great
Reply
#4

It would be great if you could post the wrong code and errors here, so someone can help you.
Reply
#5

i dont get errors it just does not work but i will post code


this is the cmd

CMD:acceptdeath(playerid, params[])
{
#pragma unused params
if (IsDead[playerid] == 0) { return 0; }
else
{
IsDead[playerid] = 0;
//SecsToGo[playerid] = AFTERLIFE_SECONDS;
//CleanPlayerChat(playerid);
SendClientMessage(playerid,COLOR_LIGHTRED,"======= ================================================== =============");
SendClientMessage(playerid,COLOR_WHITE,"You are now in the afterlife.");
SendClientMessage(playerid,COLOR_WHITE,"When you revive, you will lost memory of last 30 minutes.");
SendClientMessage(playerid,COLOR_LIGHTRED,"======= ================================================== =============");
SetPlayerPos(playerid,DeathPosX[playerid],DeathPosY[playerid],DeathPosZ[playerid]);
SetPlayerCameraPos(playerid,DeathPosX[playerid],DeathPosY[playerid],DeathPosZ[playerid]);
SetPlayerCameraLookAt(playerid,DeathPosX[playerid],DeathPosY[playerid],DeathPosZ[playerid]+100);
//AfterLifeTimer = SetTimerEx("AfterLife",1000,true,"i",playerid);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
HospitalTime[playerid] = 10;
if(PlayerInfo[playerid][pVIP] >= 2) HospitalTime[playerid] = 1;
HospitalCountDown[playerid] = SetTimerEx("HospitalTimer", 1000, false, "d", playerid);
SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
return 1;
}
}




/*public AfterLife(playerid)
{
IsAfterLifing[playerid] = 1;
SecsToGo[playerid]--;
new string[128];
format(string,sizeof(string),"~b~ ~h~ ~h~you are in afterlife~n~ ~b~ ~h~ ~h~you will come in the hospital in %d seconds",SecsToGo[playerid]);
GameTextForPlayer(playerid,string,1100,3);
if (SecsToGo[playerid] <= 0)

{
//CleanPlayerChat(playerid);
KillTimer(AfterLifeTimer);
SendClientMessage(playerid,COLOR_LIGHTRED,"======= ================================================== =============");
SendClientMessage(playerid,COLOR_WHITE,"You have revived after a long rest.");
SendClientMessage(playerid,COLOR_WHITE,"The medics have threated you and now you are healthy.");
SendClientMessage(playerid,COLOR_WHITE,"Remember, you have lost memory of recent 30 minutes.");
SendClientMessage(playerid,COLOR_LIGHTRED,"======= ================================================== =============");
SpawnPlayer(playerid);
return 1;

}
return 1;
}

public AutoDeath(playerid)
{
if (IsDead[playerid] == 0) { return 0; }
else if (IsDead[playerid] == 1)
{
new saystring[128], deathstring[128], name[28];
GetPlayerName(playerid,name,sizeof(name));
switch (random(2))
{
case 0:
{
format(saystring,sizeof(saystring),"%s mumbles: I can't hold more..", name);
format(deathstring,sizeof(deathstring),"* %s closes his eyes, falling into death.", name);
}
case 1:
{
format(saystring,sizeof(saystring),"%s mumbles: Aghh.. It's cold.. I feel something.. A light-..",name);
format(deathstring,sizeof(deathstring),"* %s is now inmobilized, and dead.",name);
}
}
SendNearbyMessage(playerid, 15, deathstring, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
SendNearbyMessage(playerid, 15, saystring, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);

IsDead[playerid] = 0;
SecsToGo[playerid] = AFTERLIFE_SECONDS;
SendClientMessage(playerid,COLOR_LIGHTRED,"======= ================================================== =============");
SendClientMessage(playerid,COLOR_WHITE,"You are now in the afterlife.");
SendClientMessage(playerid,COLOR_WHITE,"When you revive, you will lost memory of last 30 minutes.");
SendClientMessage(playerid,COLOR_LIGHTRED,"======= ================================================== =============");
SetPlayerPos(playerid,DeathPosX[playerid],DeathPosY[playerid],DeathPosZ[playerid]);
SetPlayerCameraPos(playerid,DeathPosX[playerid],DeathPosY[playerid],DeathPosZ[playerid]);
SetPlayerCameraLookAt(playerid,DeathPosX[playerid],DeathPosY[playerid],DeathPosZ[playerid]+100);
AfterLifeTimer = SetTimerEx("AfterLife",1000,true,"i",playerid);
return 1;
}
return 1;
}*/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)