[HELP]Checkpoint!
#21

here you will have to define a little bit on your own
pawn Код:
new cmd[128], tmp[128], string[128], idx;
    cmd = strtok(cmdtext, idx);

    if (strcmp("/depositdrugs", cmdtext, true, 6) == 0)

        if (PlayerToPoint(8, playerid,-78.2537,-1135.9974,1.0781,))
       
        new drugs = strval(tmp);
        // you will have to define if they have any drugs here with a -
       
        SendClientMessage(playerid, COLOR_WHITE, "/Depositdrugs[ammount]");

        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))

        new ammount = strval(tmp);
        if( ammount >= 1 && ammount <= 9999999)
        if( ammount >= 0)return SendClientMessage(playerid, COLOR_RED, "invalid Ammount");
        }
        else
        {
        Pinfo// whatever data you got , where its store you will have to put here
       
        format(string, sizeof(string), "You Have Deposited %s Drugs", ammount);
        SendClientMessage(playerid, COLOR_GOLD, string);
        format(string, sizeof(string), "You Now have Totoal Of %s Drugs after you stored %s", Pinfo, ammount);// you must define it here aswell
        SendClientMessage(playerid, COLOR_ROYALBLUE, string);
        }
        }
        else
        {
        SendClientMessage(playerid, COLOR_RED, "SERVER: You need to be in a drug checkpoint to use this command");
        }
        return 1;

    if (strcmp("/withdrawdrugs", cmdtext, true, 6) == 0)
    {
        if (PlayerToPoint(8, playerid,-78.2537,-1135.9974,1.0781,))
       
        new drugs = strval(tmp);
        // you will have to define if they have any drugs here with a +
        SendClientMessage(playerid, COLOR_WHITE, "/withdrawdrugs[ammount]");

        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))

        new ammount = strval(tmp);
        if( ammount >= 1 && ammount <= 9999999)
        if( ammount >= 0)return SendClientMessage(playerid, COLOR_RED, "invalid Ammount");
        }
        else
        {
        Pinfo// whatever data you got , where its store you will have to put here

        format(string, sizeof(string), "You Have Withdrew %s Drugs", ammount);
        SendClientMessage(playerid, COLOR_GOLD, string);
        format(string, sizeof(string), "You Now have Totoal Of %s Drugs after you took %s", Pinfo, ammount);// you must define it here aswell
        SendClientMessage(playerid, COLOR_ROYALBLUE, string);
        }
        }
        else
        {
        SendClientMessage(playerid, COLOR_RED, "SERVER: You need to be in a drug checkpoint to use this command");
        }
        return 1;
        }
    return 0;
}
Reply


Messages In This Thread
[HELP]Checkpoint! - by [Aka]Dragonu - 05.12.2010, 11:40
Re: [HELP]Checkpoint! - by SparkZ_ - 05.12.2010, 11:42
Re: [HELP]Checkpoint! - by [Aka]Dragonu - 05.12.2010, 11:51
Re: [HELP]Checkpoint! - by SparkZ_ - 05.12.2010, 11:55
Re: [HELP]Checkpoint! - by SkizzoTrick - 05.12.2010, 11:56
Re: [HELP]Checkpoint! - by [Aka]Dragonu - 05.12.2010, 12:09
Re: [HELP]Checkpoint! - by SparkZ_ - 05.12.2010, 12:12
Re: [HELP]Checkpoint! - by [Aka]Dragonu - 05.12.2010, 12:22
Re: [HELP]Checkpoint! - by fangoth1 - 05.12.2010, 13:04
Re: [HELP]Checkpoint! - by fangoth1 - 05.12.2010, 13:26
Re: [HELP]Checkpoint! - by [Aka]Dragonu - 05.12.2010, 13:28
Re: [HELP]Checkpoint! - by fangoth1 - 05.12.2010, 13:33
Re: [HELP]Checkpoint! - by [Aka]Dragonu - 05.12.2010, 13:34
Re: [HELP]Checkpoint! - by fangoth1 - 05.12.2010, 13:37
Re: [HELP]Checkpoint! - by [Aka]Dragonu - 05.12.2010, 13:38
Re: [HELP]Checkpoint! - by fangoth1 - 05.12.2010, 13:39
Re: [HELP]Checkpoint! - by [Aka]Dragonu - 05.12.2010, 13:41
Re: [HELP]Checkpoint! - by fangoth1 - 05.12.2010, 13:44
Re: [HELP]Checkpoint! - by [Aka]Dragonu - 05.12.2010, 13:48
Re: [HELP]Checkpoint! - by fangoth1 - 05.12.2010, 13:51
Re: [HELP]Checkpoint! - by fangoth1 - 05.12.2010, 14:13
Re: [HELP]Checkpoint! - by [Aka]Dragonu - 05.12.2010, 14:43
Re: [HELP]Checkpoint! - by fangoth1 - 05.12.2010, 14:59
Re: [HELP]Checkpoint! - by [Aka]Dragonu - 05.12.2010, 15:20
Re: [HELP]Checkpoint! - by fangoth1 - 05.12.2010, 15:42
Re: [HELP]Checkpoint! - by [Aka]Dragonu - 05.12.2010, 17:51

Forum Jump:


Users browsing this thread: 1 Guest(s)