Just wanted to ensure.
#1

PHP код:
{
    if (
strcmp("/heal"cmdtexttrue10) == 0)
        {
            if( 
PlayerInfo[playerid][TEAM_ME] )
            {
                    if(
GetPlayerSkin(playerid) == 274)
                    if(
GetPlayerSkin(playerid) == 275)
                    if(
GetPlayerSkin(playerid) == 276)
                    {
                            {
                                new 
targetid;
                                
SetPlayerHealth(targetid,100);
                            }
                    }
                    else
                    {
                        
SendClientMessage(playerid,0xE00404,"You are not a medicduty");
                    }
            }
            else
            {
                
SendClientMessage(playerid,0xE00404,"You are not a medic");
            }
          }
        } 
just wanted to ensure that would the script work fine?Like would it set the hp of the other person to 100?Just wanted to ensure.
Reply
#2

why don't you test it
it won't -.-
Код:
This forum requires that you wait 120 seconds between posts. Please try again in 26 seconds.
Reply
#3

Did you test it? No you didn't. Where is it supposed to get targetid? From thin air? Also your if-structure is flawed.
pawn Код:
new skin = GetPlayerSkin(playerid);
if(skin == 274 || skin == 275 || skin == 276)
Reply
#4

No I can't test this on my test server so was just asking to check if i am scripting it in the right way.
Reply
#5

sory for the double post but if you find me wrong so please correct me.
Reply
#6

hmm . .

pawn Код:
{
    if (strcmp("/heal", cmdtext, true, 10) == 0)
        {
            new skin = GetPlayerSkin(playerid);
            if(GetPlayerTeam(playerid) == TEAM_ME)
            {
                if(skin == 274 || skin == 275 || skin == 276)
                    {
                            {
                                new targetid;
                                SetPlayerHealth(targetid,100);
                            }
                    }
                    else
                    {
                        SendClientMessage(playerid,0xE00404,"You are not a medicduty");
                    }
            }
            else
            {
                SendClientMessage(playerid,0xE00404,"You are not a medic");
            }
        }
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)