Refund Script Help -
YoungWildFree - 21.02.2012
Код:
enum RefundStuffs
{
Crack,
Pot,
level,
BankCash
}
new Refund[MAX_PLAYERS][RefundStuffs];
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/refund", cmdtext, true, 10) == 0)
{
Refund[playerid][Crack] = 10;
Refund[playerid][Pot] = 10;
Refund[playerid][level] = 3;
Refund[playerid][BankCash] = 1000000;
GivePlayerMoney(playerid,500000);
return 1;
}
return 0;
}
I tried compiling this for my script and it gave me 3 errors, I'm thinking that I need to set it to a CMD Setstat
But I don't know how, Anyone know what I should do?
Re: Refund Script Help -
Toreno - 21.02.2012
Is there #include <zcmd>/<dcmd> at the top of your gamemode/filterscript?
EDIT: Also, post those three errors.
Re: Refund Script Help -
YoungWildFree - 21.02.2012
Oh, I guess not lol
Re: Refund Script Help -
Toreno - 21.02.2012
I have accidentally seen CMD as ZCMD, failed... anyway, post those three errors so I'll try help you.
Re: Refund Script Help -
YoungWildFree - 21.02.2012
ill edit message with errors
Re: Refund Script Help -
YoungWildFree - 21.02.2012
C:\Users\Justin\Desktop\Kingj\85.17.233.194 port 7783\filterscripts\refund.pwn( : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\Justin\Desktop\Kingj\85.17.233.194 port 7783\filterscripts\refund.pwn(9) : warning 235: public function lacks forward declaration (symbol "OnPlayerCommandText")
C:\Users\Justin\Desktop\Kingj\85.17.233.194 port 7783\filterscripts\refund.pwn(11) : error 017: undefined symbol "strcmp"
C:\Users\Justin\Desktop\Kingj\85.17.233.194 port 7783\filterscripts\refund.pwn(17) : error 017: undefined symbol "GivePlayerMoney"
C:\Users\Justin\Desktop\Kingj\85.17.233.194 port 7783\filterscripts\refund.pwn(1 : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Errors.
Re: Refund Script Help -
Toreno - 21.02.2012
It seems like that's all your entire script, I thought it's only a tiny part of it, yet I was wrong.
pawn Код:
#include <a_samp> // You must include this whenever starting a new script.
enum RefundStuffs
{
Crack,
Pot,
level,
BankCash
}
new Refund[MAX_PLAYERS][RefundStuffs];
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/refund", cmdtext, true, 10) == 0)
{
Refund[playerid][Crack] = 10;
Refund[playerid][Pot] = 10;
Refund[playerid][level] = 3;
Refund[playerid][BankCash] = 1000000;
GivePlayerMoney(playerid,500000);
return 1;
}
return 0;
}
Re: Refund Script Help -
YoungWildFree - 21.02.2012
Oh.... Now I see, Yeah that was the whole script lol
Re: Refund Script Help -
Toreno - 21.02.2012
Quote:
Originally Posted by YoungWildFree
Oh.... Now I see, Yeah that was the whole script lol
|
You should have mentioned that
Re: Refund Script Help -
YoungWildFree - 21.02.2012
I know right xD
EDIT: If I had Rep I would give it to you :3