help cmd
#1

help me with this command to arm is not compiled something is wrong help me?


new buylevel;
CMD:buylevel(playerid,params[])
{
if(GetPlayerMoney(playerid) > 18000)
if(buylevel == 2) //level!
{
new year,month,day; getdate(year, month, day); new hour,minute,second; gettime(hour,minute,second);
GivePlayerMoney(playerid, -18000)
dUserSetINT(PlayerName2(playerid)).("level",(buyle vel));
PlayerInfo[playerid][Level] = buylevel;
format(string,sizeof(string),"[DONATE] %s Level %d on %d/%d/%d at %d:%d:%d", PlayerName2(playerid),
buylevel, day, month, year, hour, minute, second); SendClientMessage(playerid,blue,string);
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
}
else SendClientMessage(playerid, COLOR_WHITE, "You don't have that much!");
return 1;
}
Reply
#2

I don't understand your sentence.
Reply
#3

Tell me what part you do not understand?
Reply
#4

Quote:
Originally Posted by nbx2000
Посмотреть сообщение
help me with this command to arm is not compiled something is wrong help me?

new buylevel;
CMD:buylevel(playerid,params[])
{
if(GetPlayerMoney(playerid) > 18000)
if(buylevel == 2) //level!
{
new year,month,day; getdate(year, month, day); new hour,minute,second; gettime(hour,minute,second);
GivePlayerMoney(playerid, -18000)
dUserSetINT(PlayerName2(playerid)).("level",(buyle vel));
PlayerInfo[playerid][Level] = buylevel;
format(string,sizeof(string),"[DONATE] %s Level %d on %d/%d/%d at %d:%d:%d", PlayerName2(playerid),
buylevel, day, month, year, hour, minute, second); SendClientMessage(playerid,blue,string);
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
}
else SendClientMessage(playerid, COLOR_WHITE, "You don't have that much!");
return 1;
}
Assuming that you had already set buylevel to a value, this would be the fix for your code not compiling. Also I'm assuming that you are assigning the buylevel variable to a player so change "new buylevel;" to "new buylevel[MAX_PLAYERS];" and use this in your codes/commands "buylevel(playerid);"

PHP код:
new buylevel;
CMD:buylevel(playerid,params[])
{
    if(
GetPlayerMoney(playerid) > 18000)
    {
        if(
buylevel == 2//level!
        
{
            new 
year,month,daygetdate(yearmonthday); new hour,minute,secondgettime(hour,minute,second);
            
GivePlayerMoney(playerid, -18000);
            
dUserSetINT(PlayerName2(playerid)).("level",(buylevel));
            
PlayerInfo[playerid][Level] = buylevel;
            
format(string,sizeof(string),"[DONATE] %s Level %d on %d/%d/%d at %d:%d:%d"PlayerName2(playerid),
            
buyleveldaymonthyearhourminutesecond); SendClientMessage(playerid,blue,string);
            
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
        }
    }
    else 
SendClientMessage(playeridCOLOR_WHITE"You don't have that much!");
    return 
1;

You missed a few ";" and you missed "}"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)