A bit help in zcmd.
#3

try this sir
PHP код:
CMD:medkit(playeridparmas[])
{
    new 
Float:x,
        
Float:y,
        
Float:z;
    new 
Float:ox,
        
Float:oy,
        
Float:oz;
    new 
Float:MHealth;
    
GetPlayerPos(playeridxyz);
    if(
Medkit[playerid] == 0) return SendClientMessage(playerid, -1"You are not carrying any medkit! Please visit the shop to one.");
    
Medkit[playerid] = 0;
    for(new 
0MAX_PLAYERSi++)
      {
         
OMedkit CreateObject(11738xyz000);
         
SetTimerEx("mdestroy"15000false"i"OMedkit);
         
GetObjectPos(OMedkitox,oyoz);
         
GetPlayerHealth(iMHealth);
         if(
gTeam[i] == gTeam[playerid])
           {
              if(
IsPlayerInRangeOfPoint(i10.0oxoyoz))
                 {
                     if(
MHealth 60.0)
                         {
                              
SetPlayerHealth(i100.0);
                              
SendClientMessage(i, -1"You have been healed by a deployed medkit!");
                          }
                 }
          }
     }
return 
1;
}
forward mdestroy(My_objectID);
public 
mdestroy(My_objectID)
{
   
DestroyObject(My_objectID);
   return 
1;

Reply


Messages In This Thread
A bit help in zcmd. - by DeeadPool - 16.08.2016, 17:35
Re: A bit help in zcmd. - by DeeadPool - 17.08.2016, 09:21
Re: A bit help in zcmd. - by jlalt - 17.08.2016, 09:29
Re: A bit help in zcmd. - by Vince - 17.08.2016, 09:56
Re: A bit help in zcmd. - by DeeadPool - 17.08.2016, 10:05
Re: A bit help in zcmd. - by DeeadPool - 17.08.2016, 10:19
Re: A bit help in zcmd. - by jlalt - 17.08.2016, 14:30
Re: A bit help in zcmd. - by DeeadPool - 17.08.2016, 15:03
Re: A bit help in zcmd. - by jlalt - 17.08.2016, 16:06

Forum Jump:


Users browsing this thread: 1 Guest(s)