How to do this?
#1

How to make a cmd like,

/biz till, name, lock

if strcmp pass then syntax will be /set pass [new pass]

i tried this but result is zero
PHP код:
CMD:biz(playerid,params[]){
    new 
cmd[20],playername[MAX_PLAYER_NAME],newbizname[20];
    
GetPlayerName(playeridplayernamesizeof(playername));
    for(new 
i=1;i<sizeof(BizInfo);i++){
        if(
IsPlayerInRangeOfPoint(playerid2BizInfo[i][ib_x], BizInfo[i][ib_y], BizInfo[i][ib_z])){
            if(
GetPlayerVirtualWorld(playerid)==BizInfo[i][b_id]){
                if(!
strcmp(BizInfo[i][b_owner], playername)){
                    if(
sscanf(params"s[20]"cmd)) return SendClientMessage(playeridCOLOR_ORANGE"Usage:{FFFFFF} /biz till, lock, name");
                    if(!
strcmp(cmd"name")){
                        if(
sscanf(params"s[20]s[20]"cmd,newbizname)) return SendClientMessage(playeridCOLOR_ORANGE"Usage:{FFFFFF} /biz name [New BIZ Name]");
                        
printf("%s"newbizname); // didn't rcvd
                        
print("Biz name updated"); // Didn't rcvd
                    
}
                }else{
                    return 
SendClientMessage(playeridCOLOR_ORANGE"You aren't owner of this business.");
                }
            }
        }
    }
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)