16.01.2019, 03:09
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
/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(playerid, playername, sizeof(playername));
for(new i=1;i<sizeof(BizInfo);i++){
if(IsPlayerInRangeOfPoint(playerid, 2, BizInfo[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(playerid, COLOR_ORANGE, "Usage:{FFFFFF} /biz till, lock, name");
if(!strcmp(cmd, "name")){
if(sscanf(params, "s[20]s[20]", cmd,newbizname)) return SendClientMessage(playerid, COLOR_ORANGE, "Usage:{FFFFFF} /biz name [New BIZ Name]");
printf("%s", newbizname); // didn't rcvd
print("Biz name updated"); // Didn't rcvd
}
}else{
return SendClientMessage(playerid, COLOR_ORANGE, "You aren't owner of this business.");
}
}
}
}
return 1;
}