SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 31/01/2015, 05:25 PM   #1
sojoxd
Big Clucker
 
Join Date: Jun 2014
Posts: 55
Reputation: 0
Default Injured bug

So I have an roleplay server and when someone is dead it need to make him injured not sending him to hospital but that's not working I have the /revive command. Tell me what can I do to make him to be on the ground saying this



Code:
forward SendEMSQueue(playerid,type);
public SendEMSQueue(playerid,type)
{
	switch (type)
	{
		case 1:
		{
		    Streamer_UpdateEx(playerid, GetPVarFloat(playerid,"MedicX"), GetPVarFloat(playerid,"MedicY"), GetPVarFloat(playerid,"MedicZ"));
			SetPlayerPos(playerid, GetPVarFloat(playerid,"MedicX"), GetPVarFloat(playerid,"MedicY"), GetPVarFloat(playerid,"MedicZ"));
			SetPlayerVirtualWorld(playerid, GetPVarInt(playerid,"MedicVW"));
	  		SetPlayerInterior(playerid, GetPVarInt(playerid,"MedicInt"));

			SetPVarInt(playerid, "EMSAttempt", -1);

			if(GetPlayerInterior(playerid) > 0) Player_StreamPrep(playerid, GetPVarFloat(playerid,"MedicX"), GetPVarFloat(playerid,"MedicY"), GetPVarFloat(playerid,"MedicZ"), 4000);
			GameTextForPlayer(playerid, "~r~Injured~n~~w~ /service ems", 5000, 3);
			ClearAnimations(playerid);
			ApplyAnimation(playerid, "KNIFE", "KILL_Knife_Ped_Die", 4.0, 0, 1, 1, 1, 0, 1);
			SetPlayerHealth(playerid, 100);
			SetPlayerArmour(playerid,0);
			if(GetPVarInt(playerid, "usingfirstaid") == 1)
			{
			    firstaidexpire(playerid);
			}
			SetPVarInt(playerid,"MedicCall",1);
		}
		case 2:
		{
		    SetPVarInt(playerid,"EMSAttempt", 2);
			ClearAnimations(playerid);
		 	ApplyAnimation(playerid, "SWAT", "gnstwall_injurd", 4.0, 0, 1, 1, 1, 0, 1);
			SetPlayerHealth(playerid, 100);
			SetPlayerArmour(playerid,0);
		}
	}
	return 1;
}





Code:
CMD:revive(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] >= 1)
	{
		new string[128], giveplayerid;
		if(sscanf(params, "i", giveplayerid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /revive [playerid]");

		if(IsPlayerConnected(giveplayerid))
		{
			if(GetPVarInt(giveplayerid, "Injured") == 1)
			{
				format(string, sizeof(string), " You have revived %s.", GetPlayerNameEx(giveplayerid));
				SendClientMessageEx(playerid, COLOR_WHITE, string);
				SendClientMessageEx(giveplayerid, COLOR_WHITE, "You have been revived by an Admin.");

				KillEMSQueue(giveplayerid);
   				ClearAnimations(giveplayerid);
   				SetPlayerHealth(giveplayerid, 100);
			}
			else
			{
				SendClientMessageEx(playerid, COLOR_GRAD2, "That player is not injured!");
			}
		}
	}
	else
	{
		SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
	}
	return 1;
}
sojoxd is offline   Reply With Quote
Old 31/01/2015, 06:50 PM   #2
sojoxd
Big Clucker
 
Join Date: Jun 2014
Posts: 55
Reputation: 0
Default Re: Injured bug

Also I have a Family System and I do /adjust name " Example". I restart the server and family name gone.
Someone can give me some support please?
sojoxd is offline   Reply With Quote
Old 31/01/2015, 08:33 PM   #3
sojoxd
Big Clucker
 
Join Date: Jun 2014
Posts: 55
Reputation: 0
Default Re: Injured bug

Bump please help me
sojoxd is offline   Reply With Quote
Old 01/02/2015, 08:06 AM   #4
sojoxd
Big Clucker
 
Join Date: Jun 2014
Posts: 55
Reputation: 0
Default Re: Injured bug

Help me man..
sojoxd is offline   Reply With Quote
Old 01/02/2015, 08:32 AM   #5
dirigent00
Big Clucker
 
Join Date: Jul 2014
Posts: 72
Reputation: 1
Default Re: Injured bug

Okay, I dunno what is problem in first thing, bcuz I didn't understand u. Second, your system is probably not saving name of organization, I mean on string, sto give us a codes for that, and explain what is problem in first thing.
dirigent00 is offline   Reply With Quote
Old 02/02/2015, 11:36 AM   #6
sojoxd
Big Clucker
 
Join Date: Jun 2014
Posts: 55
Reputation: 0
Default Re: Injured bug

Ok. This server has a injured system like when you have 0 hp it makes you in /injured with 100 hp and it's going down tilll EMS arrive, but the problem is when I kill someone it didn't work I mean it's senting him to hospital without any chance to can do /revive on him.
What I can show you about /families ?
sojoxd is offline   Reply With Quote
Old 02/02/2015, 11:42 AM   #7
Sew_Sumi
Banned
 
Join Date: Jun 2008
Location: Azerbaijan
Posts: 6,244
Reputation: 525
Default Re: Injured bug

Looks a bit like NGRPs script there........
Sew_Sumi is offline   Reply With Quote
Old 02/02/2015, 03:31 PM   #8
sojoxd
Big Clucker
 
Join Date: Jun 2014
Posts: 55
Reputation: 0
Default Re: Injured bug

Nah it's isn't.
sojoxd is offline   Reply With Quote
Old 02/02/2015, 05:02 PM   #9
Sew_Sumi
Banned
 
Join Date: Jun 2008
Location: Azerbaijan
Posts: 6,244
Reputation: 525
Default Re: Injured bug

It's an NGRP edit.

Sorry to burst your bubble, but it's a stolen script, therefore, not a good thing to be in possession of or working on...
Sew_Sumi is offline   Reply With Quote
Old 02/02/2015, 08:02 PM   #10
sojoxd
Big Clucker
 
Join Date: Jun 2014
Posts: 55
Reputation: 0
Default Re: Injured bug

IT'S NOT. It's a filterscript of American Roleplay
sojoxd is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Deathscript // Injured Jennifer Scripting Help 3 12/11/2014 12:29 PM
Injured animation Dziugsas Scripting Help 2 10/11/2014 06:29 PM
Problem with injured after die Auditore155 Scripting Help 1 30/05/2014 01:40 AM
Injured after die Auditore155 Scripting Help 5 13/03/2014 05:55 AM
This just gets all the server injured CROSS_Hunter Scripting Help 4 28/05/2013 09:49 AM


All times are GMT. The time now is 06:14 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.