[HELP!] This command doesn't Work - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP!] This command doesn't Work (
/showthread.php?tid=72785)
[HELP!] This command doesn't Work -
MarcoNecroX - 10.04.2009
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
Re: [HELP!] This command doesn't Work -
gijsmin - 10.04.2009
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;
}
Re: [HELP!] This command doesn't Work -
MarcoNecroX - 11.04.2009
thank you a LOT