[HELP!] This command doesn't Work
#1

Hello everybody, I made this command:

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{

GetPlayerHealth(playerid);

    if (strcmp("/tele", cmdtext, true, 10) == 0)
    {
       if (GetPlayerHealth(playerid) >= 100)
       {
         ShowMenuForPlayer(teleport,playerid);
         TogglePlayerControllable(playerid,false);
         return 1;
       }
			 else
       {
         SendClientMessage(playerid, COLOR_ULTRARED,"Make sure you are 100% healthy.");
         SendClientMessage(playerid, COLOR_ULTRARED," This is for preventying anyone to abuse from this command");
       }
     return 1;
     }
return 0;
}
Please help, i don't know what's going wrong, it compiles so:

Код:
C:\Archivos de programa\SAMP Server\SERVER 6 [::TheMafia::]\filterscripts\teleport2.pwn(98) : warning 202: number of arguments does not match definition
C:\Archivos de programa\SAMP Server\SERVER 6 [::TheMafia::]\filterscripts\teleport2.pwn(100) : warning 217: loose indentation
C:\Archivos de programa\SAMP Server\SERVER 6 [::TheMafia::]\filterscripts\teleport2.pwn(102) : warning 202: number of arguments does not match definition
C:\Archivos de programa\SAMP Server\SERVER 6 [::TheMafia::]\filterscripts\teleport2.pwn(113) : warning 217: loose indentation
C:\Archivos de programa\SAMP Server\SERVER 6 [::TheMafia::]\filterscripts\teleport2.pwn(115) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Warnings.
In the game when i type "/tele" , it says always that my life is under 100%...

Thanx for help !!

bye
Reply
#2

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{

    if (strcmp("/tele", cmdtext, true, 10) == 0)
    {
        new Float:PlayerHealth;
        GettPlayerHealth(playerid,PlayerHealth);
        if (PlayerHealth >= 100)
        {
            ShowMenuForPlayer(teleport,playerid);
            TogglePlayerControllable(playerid,false);
        }
        else
        {
            SendClientMessage(playerid, COLOR_ULTRARED,"Make sure you are 100% healthy.");
            SendClientMessage(playerid, COLOR_ULTRARED," This is for preventying anyone to abuse from this command");
        }
        return 1;
     }
return 0;
}
Reply
#3

thank you a LOT
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)