Medic Class Needed - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Medic Class Needed (
/showthread.php?tid=500481)
Medic Class Needed -
Smcrew12 - 13.03.2014
Hellow Guys I need Medic Class
Medic can use /heal [ID] And He need to be near to his teammates and Can use /heal cmd every 1 Minute and Can heal his team mate +30HP and Gets $6000
Please help me!
My Teams are
Eurasia
Arabia
USA
Aus
Soviet
China
Re: Medic Class Needed -
UnknownOwner - 13.03.2014
This is
Scripting Help, where you ask us to FIX your ERRORS, not to request a script.
Post in
Server Support -> Looking for Scripters/Helpers? Post Here!
Re: Medic Class Needed -
Smcrew12 - 13.03.2014
Sir I need The cmd because I am new to Script and I want someone to help me
Re: Medic Class Needed -
Smcrew12 - 13.03.2014
I managed to create it but IT wont Work
i used /heal And Nothing Happens
Please Help Me
Re: Medic Class Needed -
Smcrew12 - 14.03.2014
/Bump
Re: Medic Class Needed -
Matess - 14.03.2014
Show us your code and we can fix it.
Re: Medic Class Needed -
Smcrew12 - 14.03.2014
Код:
CMD:heal(playerid,params[])
{
new tid;
new Float:health
if(sscanf(params,"ud",tid,Float:health)) return SendClientMessage(playerid,-1,"USAGE: /heal [id] [value]");
if(!IsPlayerConnected(tid)) return SendClientMessage(playerid,-1,"Error: Invalid ID ");
if(GetPlayerTeam(playerid) == Medic)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if(!IsPlayerInRangeOfPoint(tid, 5.0, x, y, z)) return SendClientMessage(playerid,-1,"Your not near anyone");
SetPlayerHealth(tid,Float:health);
}
return 1;
}
Please Help me and Please make this cmd as /heal id istead of /heal [id] [value]
and please whean a player use /heal [id] the player heals another player 30+HP and get $7000
PLEASE HELP ME!
Re: Medic Class Needed -
Matess - 14.03.2014
pawn Код:
CMD:heal(playerid,params[])
{
new tid;
new Float:health
if(sscanf(params,"u",tid)) return SendClientMessage(playerid,-1,"USAGE: /heal [id]");
if(!IsPlayerConnected(tid)) return SendClientMessage(playerid,-1,"Error: Invalid ID ");
if(GetPlayerTeam(playerid) == Medic)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if(!IsPlayerInRangeOfPoint(tid, 5.0, x, y, z)) return SendClientMessage(playerid,-1,"Your not near anyone");
GetPlayerHealth(tid,health);
SetPlayerHealth(tid,health+30.0);
GivePlayerMoney(playerid, +7000);
}
return 1;
}
Re: Medic Class Needed -
Smcrew12 - 14.03.2014
Thank you
Re: Medic Class Needed -
Smcrew12 - 14.03.2014
Код:
C:\Users\GhOsTZoNe\Desktop\cod\gamemodes\codwaw32.pwn(12469) : error 029: invalid expression, assumed zero
C:\Users\GhOsTZoNe\Desktop\cod\gamemodes\codwaw32.pwn(12469) : warning 215: expression has no effect
C:\Users\GhOsTZoNe\Desktop\cod\gamemodes\codwaw32.pwn(12469) : error 001: expected token: ";", but found ")"
C:\Users\GhOsTZoNe\Desktop\cod\gamemodes\codwaw32.pwn(12469) : error 029: invalid expression, assumed zero
C:\Users\GhOsTZoNe\Desktop\cod\gamemodes\codwaw32.pwn(12469) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
I got these errors

and add that it can be used in every 1 minute