DEFAULT CMD AND PARAMS
#5

Some tips:

1. Don't use 'attention seeking' titles, this means you may not use caps
2. Use informative titles
3. Use the 'modern' functions.

Use ZCMD + sscanf + definitions instead of strcmp + strtok and unnecessary codes.

Example code:
PHP код:
#define MAX_HOUSES    1000
CMD:createhouse(playeridparams[])
{
    if(
admin == 0) return SendClientMessage(................);
    if(
houses >= MAX_HOUSES) return SendClientMessage(............);
    if(
sscanf(params"dd"housetypeinterior)) return SendClientMessage(...............);
    return 
1;

Reply


Messages In This Thread
DEFAULT CMD AND PARAMS - by Pearson - 15.12.2016, 17:27
Re: DEFAULT CMD AND PARAMS - by Jefff - 15.12.2016, 18:38
Re: DEFAULT CMD AND PARAMS - by Pearson - 15.12.2016, 19:04
Re: DEFAULT CMD AND PARAMS - by Jefff - 15.12.2016, 23:36
Re: DEFAULT CMD AND PARAMS - by Logic_ - 16.12.2016, 10:55

Forum Jump:


Users browsing this thread: 1 Guest(s)