Need help. - 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)
+--- Thread: Need help. (
/showthread.php?tid=436589)
Need help. -
edgargreat - 12.05.2013
Hey guys, i need help. I make a /getrefund command and then when they type the /getrefund they getting the refund, but when they type many times the /getrefund they getting it many times. help please, that they can get it 1 time only.
Here's the line.
Код:
CMD:getrefund(playerid, params[])
{
if(PlayerInfo[playerid][pConnectTime] < 1)
{
SendClientMessage(playerid, COLOR_ORANGE, "You can't get your refunds, you need to have a 3 hours playing time!");
return 1;
}
if(PlayerInfo[playerid][pConnectTime]>= 3)
{
PlayerInfo[playerid][pCash] = 10000000;
PlayerInfo[playerid][pLevel] = 4;
PlayerInfo[playerid][pDonator] = 2;
SendClientMessage(playerid, COLOR_ORANGE, "Thanks for getting your refund! Enjoy!");
}
return 1;
}
Re: Need help. -
Warbles - 12.05.2013
Код:
CMD:getrefund(playerid, params[])
{
if(PlayerInfo[playerid][pConnectTime] < 1)
{
SendClientMessage(playerid, COLOR_ORANGE, "You can't get your refunds, you need to have a 3 hours playing time!");
return 1;
}
if(PlayerInfo[playerid][pConnectTime]>= 3)
{
PlayerInfo[playerid][pCash] = 10000000;
PlayerInfo[playerid][pLevel] = 4;
PlayerInfo[playerid][pDonator] = 2;
SendClientMessage(playerid, COLOR_ORANGE, "Thanks for getting your refund! Enjoy!");
}
if(GETREFUND[playerid] == 1)
{
return SendClientMessage(playerid, COLOR_ORANGE, "You already got a refund!");
}
return 1;
}
If that doesn't work tell me and Ill figure it out.
Re: Need help. -
edgargreat - 12.05.2013
i can't understand, please use a code.
Re: Need help. -
Warbles - 12.05.2013
I updated it its code now
Re: Need help. -
Knappen - 12.05.2013
This is a bit off-topic, but for next time, please use a more describing thread for your topic. This attracts more interest, and lets people know instantly if they can help you or not.
Just a hint for next time.
Re: Need help. -
edgargreat - 12.05.2013
I got this error.
Код:
C:\Users\aNdRe\Downloads\UnderWorld Roleplay\UnderWorld Roleplay\gamemodes\SLRP.pwn(12875) : error 017: undefined symbol "GETREFUND"
C:\Users\aNdRe\Downloads\UnderWorld Roleplay\UnderWorld Roleplay\gamemodes\SLRP.pwn(12875) : warning 215: expression has no effect
C:\Users\aNdRe\Downloads\UnderWorld Roleplay\UnderWorld Roleplay\gamemodes\SLRP.pwn(12875) : error 001: expected token: ";", but found "]"
C:\Users\aNdRe\Downloads\UnderWorld Roleplay\UnderWorld Roleplay\gamemodes\SLRP.pwn(12875) : error 029: invalid expression, assumed zero
C:\Users\aNdRe\Downloads\UnderWorld Roleplay\UnderWorld Roleplay\gamemodes\SLRP.pwn(12875) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Re: Need help. -
edgargreat - 12.05.2013
I got this error.
Код:
C:\Users\aNdRe\Downloads\UnderWorld Roleplay\UnderWorld Roleplay\gamemodes\SLRP.pwn(12875) : error 017: undefined symbol "GETREFUND"
C:\Users\aNdRe\Downloads\UnderWorld Roleplay\UnderWorld Roleplay\gamemodes\SLRP.pwn(12875) : warning 215: expression has no effect
C:\Users\aNdRe\Downloads\UnderWorld Roleplay\UnderWorld Roleplay\gamemodes\SLRP.pwn(12875) : error 001: expected token: ";", but found "]"
C:\Users\aNdRe\Downloads\UnderWorld Roleplay\UnderWorld Roleplay\gamemodes\SLRP.pwn(12875) : error 029: invalid expression, assumed zero
C:\Users\aNdRe\Downloads\UnderWorld Roleplay\UnderWorld Roleplay\gamemodes\SLRP.pwn(12875) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Re: Need help. -
Warbles - 12.05.2013
Код:
CMD:getrefund(playerid, params[])
{
if(PlayerInfo[playerid][pConnectTime] < 1)
{
SendClientMessage(playerid, COLOR_ORANGE, "You can't get your refunds, you need to have a 3 hours playing time!");
return 1;
}
if(PlayerInfo[playerid][pConnectTime]>= 3)
{
PlayerInfo[playerid][pCash] = 10000000;
PlayerInfo[playerid][pLevel] = 4;
PlayerInfo[playerid][pDonator] = 2;
SendClientMessage(playerid, COLOR_ORANGE, "Thanks for getting your refund! Enjoy!");
}
if(REFUND[playerid] == 1)
{
REFUND[playerid]=1;
return SendClientMessage(playerid, COLOR_ORANGE, "You already got a refund!");
}
return 1;
}
Try that... its hard to script this command lol