help plz with this cmd +rep
#1

PHP код:
dcmd_lotto(playerid,params[])
{
    new 
ticketstring[128];
    if(
LottoRunning == 0) return SendClientMessage(playerid,LIGHTBLUE,"[NGP]: {FFFF80}There isn't a lotto running!");
    if(
sscanf(params,"d",ticket)) return SendClientMessage(playerid,LIGHTBLUE,"[NGP]: {FFFF80}/lotto [1-10]");
    {
    if(
ticket || ticket 10) return SendClientMessage(playerid,LIGHTBLUE,"[NGP]: {FFFF80}Lotto ticket must be within 1 and 10.");
    if(
lottowinner[playerid] == 1) return SendClientMessage(playerid,LIGHTBLUE,"[NGP]: {FFFF80}You already have a lotto ticket!");
    if(
IsNumTaken(ticket))return SendClientMessage(playerid,LIGHTBLUE,"[NGP]: {FFFF80}This number is already taken by someone!");
    
format(string,sizeof(string),"[NGP]: {FFFF80}You have bought ticket number %i. Good luck!",ticket);
    
SendClientMessage(playerid,LIGHTBLUE,string);
    
lottowinner[playerid] = 1;
    
ticketnum[playerid]=ticket;
    }
    return 
1;

i take number 1 and other take also 1 why client message is not come already taken by some one
Reply


Messages In This Thread
help plz with this cmd +rep - by LovelySoomro - 04.04.2016, 08:41
Re: help plz with this cmd +rep - by Harty - 04.04.2016, 08:45
Re: help plz with this cmd +rep - by LovelySoomro - 04.04.2016, 11:17
Re: help plz with this cmd +rep - by LovelySoomro - 04.04.2016, 11:57
Re: help plz with this cmd +rep - by LovelySoomro - 04.04.2016, 12:12

Forum Jump:


Users browsing this thread: 1 Guest(s)