Help with a single command -
Stryp - 25.03.2011
Hello everybody, i got a problem.
I get this error:
Код:
C:\Users\Бdi\Documents\SA-MP\pawno\new2.pwn(22) : error 017: undefined symbol "givePlayerMoney"
C:\Users\Бdi\Documents\SA-MP\pawno\new2.pwn(23) : error 017: undefined symbol "setPlayerHealth"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
When trying to compile this script:
Код:
#include <a_samp>
#include <a_players>
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blank Filterscript by Stryp");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
/* Mit tegyьnk, amikor a jбtйkos parancsot нr be */
{
if (strcmp("/healme", cmdtext, true, 7) == 0) // Ha a parancsa /healme
{
givePlayerMoney(playerid,-200); // Adunk neki -200 dollбrt, azaz elveszьnk
setPlayerHealth(playerid,100); // Viszont kap йletet, teletцltjьk
return 1;
/* Ne legyen SERVER: Unknown Command. kiнrбs, mivel sikeresen vйgrehajtottuk
a parancsot, semmi hiba nem tцrtйnt. */
}
return 0;
/* Ha nincs ilyen parancs, нrja ki: SERVER: Unknown Command. */
}
EDIT: Comments are in hungarian
Re: Help with a single command -
MadeMan - 25.03.2011
It's GivePlayerMoney and SetPlayerHealth.
Re: Help with a single command -
Stryp - 25.03.2011
oh true, just wrote it in lua-style
![Cheesy](images/smilies/biggrin.png)
thanks
Re: Help with a single command -
[ProX]BlueFire - 25.03.2011
u should remember then u need to put the first letter as a BIG letter
for eximple:
wrong!
Код:
public onPlayerConnect(somthing)
{
sendClientmessage(playerid, 0xFFFFFF, "You have connected to our server");
return 1;
}
good!
Код:
public onPlayerConnect(somthing)
{
SendClientMessage(playerid, 0xFFFFFF, "You have connected to our server");
return 1;
}
i hope u know what i talking about =D
Re: Help with a single command -
Stryp - 25.03.2011
yes, i got it, lua-style is like this:
(example command, but works)
setTimer(function()setElementHealth(root,1000) end, 1000,30)
it sets a timer for 1 second which runs for 30 times, and sets everything's health to 1000 (vehicles, robots, players).
in lua, you need to write the first as a small one.
setTimer
setElementHealth
setElementPosition
outputChatBox (same as SendClientMessage in samp)
um, this was MTA.
Re: Help with a single command -
[ProX]BlueFire - 25.03.2011
nope the first should be BIG
SetTimer
SetElementHealth
SetElementPosition
OutputChatBox (i dont thing it even exist,mybe if u have an .inc for thet...)
Re: Help with a single command -
Stryp - 25.03.2011
i wrote:
MTA = Multi Theft Auto, another multiplayer mode, with another scripting system and language. In pawn it should be big, in Lua it should be small
Re: Help with a single command -
[ProX]BlueFire - 25.03.2011
ya ik what is this....