Need help.
#1

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;
}
Reply
#2

Код:
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.
Reply
#3

i can't understand, please use a code.
Reply
#4

I updated it its code now
Reply
#5

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.
Reply
#6

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.
Reply
#7

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.
Reply
#8

Код:
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
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)