I got a simple problem
#1

Hi.

I got a command ony my script.
People using this code like /getgift.
When They use this command, They shouldn't use it again.

I mean

First try : /getgift

Blabla bla.

Second try: /getgift

"You can't use this command again."

Can you make it ? Thanks .
Reply
#2

I guess you can make a variable which checks if the player received the gift in the last 7 hours.
Reply
#3

I think it is because of every players get a gift every 5 hours. (depend on your script) if not try check your script.
Reply
#4

pawn Код:
#include <a_samp>

new bool:Gift[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
    Gift[playerid] = false;
    return 1;
}

public OnPlayerCommandText(playerid,cmdtext[])
{
    if(!strcmp(cmdtext,"/gift",true))
    {
        if(Gift[playerid] == true) return SendClientMessage(playerid,0xFF0000FF,"You can't take another gift!");
        Gift[playerid] = true;
        //code to give gift goes here
        return 1;
    }
    return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)