CMD:b(playerid, params[])
CMD:s(playerid, params[]){ new plname[24],string[128],msg[128]; if (sscanf(params, \"s[128]\", string)) return SendClientMessage(playerid, COLOR_BROWN, \"...\"); GetPlayerName(playerid, plname, 24); format(msg, 128,\"%s ordítja: %s\", plname, string); ProxDetector(40.0, playerid, msg, COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE); return 1;}
#include <zcmd>
OnPlayerCommandReceived(playerid, cmdtext[])//Amikor a játékos meghívja a parancsot,ha return 0; akkor nem fut le a parancs.OnPlayerCommandPerformed(playerid, cmdtext[], success)//Amikor a parancs lefut. Ha itt van a return 0; akkor Unknow command....
public OnPlayerCommandText(playerid,cmdtext[]){ if(strcmp(cmdtext, \"/parancs\", true) == 0) { return 1; } return 0;}
public OnPlayerCommandPerformed(playerid, cmdtext[], success){return 1;} public OnPlayerCommandReceived(playerid, cmdtext[]){return 1;}
if(strcmp(cmd, \"/b\", true) == 0){ new plname[24],string[256]; GetPlayerName(playerid, plname, 24); format(string, sizeof(string),\"[OOC] %s: %s\", plname, cmdtext[3]); ProxDetector(30.0, playerid, string, COLOR_GRAD6,COLOR_GRAD5,COLOR_GRAD4,COLOR_GRAD3,COLOR_GRAD2); return 1;}if(strcmp(cmd, \"/s\", true) == 0){ new plname[24],string[256]; GetPlayerName(playerid, plname, 24); format(string, sizeof(string),\"%s ordítja: %s\", plname, cmdtext[3]); ProxDetector(40.0, playerid, string, COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE); return 1;}
Nem tudom, hogy ehez minek sscanfszemély szerint az sscanf nekem bonyolult is xD if(strcmp(cmd, \"/b\", true) == 0){ new plname[24],string[256]; GetPlayerName(playerid, plname, 24); format(string, sizeof(string),\"[OOC] %s: %s\", plname, cmdtext[3]); ProxDetector(30.0, playerid, string, COLOR_GRAD6,COLOR_GRAD5,COLOR_GRAD4,COLOR_GRAD3,COLOR_GRAD2); return 1;}if(strcmp(cmd, \"/s\", true) == 0){ new plname[24],string[256]; GetPlayerName(playerid, plname, 24); format(string, sizeof(string),\"%s ordítja: %s\", plname, cmdtext[3]); ProxDetector(40.0, playerid, string, COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE); return 1;}