Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new dead[MAX_PLAYERS], Float:deadX[MAX_PLAYERS], Float:deadY[MAX_PLAYERS], Float:deadZ[MAX_PLAYERS], deadPickup[MAX_PLAYERS];
- public OnPlayerSpawn(playerid)
- {
- if(dead[playerid] == 1)
- {
- SetPlayerHealth(playerid, 1);
- SetPlayerPos(playerid, deadX[playerid], deadY[playerid], deadZ[playerid]);
- ApplyAnimation(playerid, "KNIFE", "KILL_Knife_Ped_Die", 4, 0 ,0 ,1, 0, 1);
- deadPickup[playerid] = CreatePickup(1313, 1, deadX[playerid], deadY[playerid], deadZ[playerid], 0);
- }
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- GetPlayerPos(playerid, deadX[playerid], deadY[playerid], deadZ[playerid]);
- TogglePlayerControllable(playerid, 0);
- SendClientMessage(playerid, ROT, "Du bist gestorben. Ein Medic wird dich in Kürze wiederbeleben.");
- dead[playerid] = 1;
- return 1;
- }
- ocmd:revive(playerid, params[])
- {
- if(GetPVarInt(playerid, "Fraktion") == 2)
- {
- new pID, Float:x, Float:y, Float:z, Float:health;
- if(sscanf(params, "u", pID)) return SendClientMessage(playerid, ROT, "/revive [ID]");
- GetPlayerPos(pID, x, y, z);
- GetPlayerHealth(pID, health);
- if(IsPlayerInRangeOfPoint(playerid, 2, x, y, z) and health == 1)
- {
- SetPlayerHealth(pID, 30);
- ClearAnimations(pID);
- TogglePlayerControllable(pID, 1);
- dead[pID] = 0;
- DeletePickup(deadPickup[pID]);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement