if(strcmp(cmd, \"/alnev\", true) == 0) {if(IsPlayerConnected(playerid)){ if (PlayerInfo[playerid][szervTag] == 5 || PlayerInfo[playerid][szervLeader] == 5) { new alalnev[24]; alalnev = strtok(cmdtext, idx); if(!strlen(alalnev)) { SendClientMessage(playerid,COLOR_LIGHTBLUE,\"SunLife RPG: /alnev [Álneved]\"); return 1; } if (alnev[playerid] == 0) { new nev[32]; alneve = strtok(alalnev, idx); alnev[playerid] = 1; new uzi1[126]; format(uzi1, 126, \"%s lett az álneved!\", alneve); SendClientMessage(playerid,COLOR_RED, uzi1); new h,mi,s,y,m,d; getdate(y,m,d); gettime(h,mi,s); format(stringx,sizeof(stringx), \"[%d/%d/%d][%d:%d:%d] %s álneve: %s.\",y,m,d,h,mi,s,nev,alneve); LoOoG(stringx); } else if (alnev[playerid] == 1) { SendClientMessage(playerid,COLOR_RED, \"Kikapcsoltad az álnevedet!\"); alnev[playerid] = 0; }} else { SendClientMessage(playerid, COLOR_GRAD1, \"Nem vagy F.B.I. Ügynök!\");}}return 1; }
CMD:alnev(playerid,params[]){ new alneve[24],nev[32],stringx[128],h,mi,s,y,m,d;if(sscanf(params,\"s[24]\",alneve))return SendClientMessage(playerid,COLOR_LIGHTBLUE,\"SunLife RPG: /alnev [Álneved]\");if(alnev[playerid] == 0){ alnev[playerid] = 1; getdate(y,m,d);gettime(h,mi,s); format(stringx,sizeof(stringx), \"[%d/%d/%d][%d:%d:%d] %s álneve: %s.\",y,m,d,h,mi,s,nev,alneve); SendClientMessage(playerid,COLOR_RED, stringx);}else{ SendClientMessage(playerid,COLOR_RED, \"Kikapcsoltad az álnevedet!\"); alnev[playerid] = 0; }return 1;}
#include <zcmd>#include <sscanf2>
// PM Commandif(strcmp(\"/pm\", cmd, true) == 0){tmp = strtok(cmdtext,idx);if(!strlen(tmp) || strlen(tmp) > 5) { SendClientMessage(playerid,ADMINFS_MESSAGE_COLOR,\"Usage: /pm (id) (message)\"); return 1;}
CMD:taxis(playerid,params[]){tmp = strtok(cmdtext,idx);if(!strlen(tmp) || strlen(tmp) > 5) { SendClientMessage(playerid,ADMINFS_MESSAGE_COLOR,\"Usage: /pm (id) (message)\"); return 1;}return 1;}
http://sampforum.hu/index.php?page=zcmd