#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, \"\")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1public OnPlayerCommandText(playerid, cmdtext[]){//par dcmd(stat,4,cmdtext); //....töbi parancs ami mûködik}dcmd_stat(playerid,params[]){new id,Float:rat,Float:hp,Float:arm;if(sscanf(params,\"u\",id)){ rat=PlayerInfo[id][Kills]/PlayerInfo[id][Deaths]; GetName(id,Name); GetPlayerHealth(id,hp); GetPlayerArmour(id,arm);fpm(playerid,STR,-1,\"{FF0000}[{00FF00}INFO{FF0000}]: {F7FF00}%s{A2A1A1}(%d) Kills:%d | Deaths: %d | Ratio: %0.2f | HP: %d | ARM: %d | ping: %d\",Name,id,PlayerInfo[id][Kills],PlayerInfo[id][Deaths],rat,floatround(hp),floatround(arm),GetPlayerPing(id));}if(!sscanf(params,\"u\",id)){ id=playerid; rat=PlayerInfo[id][Kills]/PlayerInfo[id][Deaths]; GetName(id,Name); GetPlayerHealth(id,hp); GetPlayerArmour(id,arm);fpm(playerid,STR,-1,\"{FF0000}[{00FF00}INFO{FF0000}]: {F7FF00}%s{A2A1A1}(%d) Kills:%d | Deaths: %d | Ratio: %0.2f | HP: %d | ARM: %d | ping: %d\",Name,id,PlayerInfo[id][Kills],PlayerInfo[id][Deaths],rat,floatround(hp),floatround(arm),GetPlayerPing(id));}return 1;}
fpm define:#define fpm(%1,%2,%3,%4); format(%2,sizeof(%2),%4); smp(%1,%3,%2);a parancsok után:else{ fpm(playerid,STR,-1,\"{FF0000}[ERROR]: {A2A1A1}A {FF0000}\'%s\'{A2A1A1} parancs nem létezik segitséghez /help!\",cmdtext); return 1;}
dcmd_stat(playerid,params[]){new id,Float:rat,Float:hp,Float:arm;if(sscanf(params,\"u\",id)){ rat=PlayerInfo[id][Kills]/PlayerInfo[id][Deaths]; GetName(id,Name); GetPlayerHealth(id,hp); GetPlayerArmour(id,arm); fpm(playerid,STR,-1,\"{FF0000}[{00FF00}INFO{FF0000}]: {F7FF00}%s{A2A1A1}(%d) Kills:%d | Deaths: %d | Ratio: %0.2f | HP: %d | ARM: %d | ping: %d\",Name,id,PlayerInfo[id][Kills],PlayerInfo[id][Deaths],rat,floatround(hp),floatround(arm),GetPlayerPing(id));}else{ rat=PlayerInfo[playerid][Kills]/PlayerInfo[playerid][Deaths]; GetName(playerid,Name); GetPlayerHealth(playerid,hp); GetPlayerArmour(playerid,arm); fpm(playerid,STR,-1,\"{FF0000}[{00FF00}INFO{FF0000}]: {F7FF00}%s{A2A1A1}(%d) Kills:%d | Deaths: %d | Ratio: %0.2f | HP: %d | ARM: %d | ping: %d\",Name,playerid,PlayerInfo[playerid][Kills],PlayerInfo[playerid][Deaths],rat,floatround(hp),floatround(arm),GetPlayerPing(playerid));}return 1;}