if(strcmp(cmd, \"/b\", true) == 0)//local ooc{ if(IsPlayerConnected(playerid)) { if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, \" Nem vagy bejelentkezve !\"); return 1; } GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= \' \')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_GRAD2, \"USAGE: /b [szöveg]\"); return 1; } format(string, sizeof(string), \"%s NonRP: (( %s ))\", sendername, result); ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); printf(\"%s\", string);}return 1;}
if(strcmp(cmd, \"/k\", true) == 0)//local say{ if(IsPlayerConnected(playerid)) { if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, \" Nem vagy bejelentkezve !\"); return 1; } GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= \' \')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_GRAD2, \"USAGE: /k [szöveg]\"); return 1; } format(string, sizeof(string), \"%s mondja: %s\", sendername, result); ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); printf(\"%s\", string);}return 1;}
Leszedsz egy RP módot és kiszeded belõle a /b parancsot A /k parancs is hasonló if(strcmp(cmd, \"/b\", true) == 0)//local ooc{ if(IsPlayerConnected(playerid)) { if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, \" Nem vagy bejelentkezve !\"); return 1; } GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= \' \')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_GRAD2, \"USAGE: /b [szöveg]\"); return 1; } format(string, sizeof(string), \"%s NonRP: (( %s ))\", sendername, result); ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); printf(\"%s\", string);}return 1;} Kiszedtem egy RP módból a színeket írd át a tiedre, mert valószínû, hogy nem lesznek Definálva, de lehet, hogy tévedek /k : if(strcmp(cmd, \"/k\", true) == 0)//local say{ if(IsPlayerConnected(playerid)) { if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, \" Nem vagy bejelentkezve !\"); return 1; } GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= \' \')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_GRAD2, \"USAGE: /k [szöveg]\"); return 1; } format(string, sizeof(string), \"%s mondja: %s\", sendername, result); ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); printf(\"%s\", string);}return 1;}
#include a_samp#include zcmd#include sscanfCMD:b(playerid,params[]){new szoveg[120];if(sscanf(params,\"s\",szoveg)) return SendClientMessage(playerid, 0x0ffff, \"/b szöveg\");new string[128];GetPlayerName(playerid,string,24);format(string,128,\"(( %s mondja: %s ))\",string,szoveg);SendClientMessageToAll(0x0ffff,string);return 1;}CMD:k(playerid,params[]){new szoveg[120];if(sscanf(params,\"s\",szoveg)) return SendClientMessage(playerid, 0x0ffff, \"/k szöveg\");new string[128];GetPlayerName(playerid,string,24);format(string,128,\"%s mondja: %s\",string,szoveg);SendClientMessageToAll(0x0ffff,string);return 1;}