Cmd,created with sscanf and zcmd:
PHP код:
COMMAND:fr(playerid,param[])
{
if(fraction[playerid] == 1) return SendClientMessage(playerid,0xff0034AA,"Òû íå íàõîäèøüñÿ â ôðàêöèè");
new message[256],str[256];
new str2[256];
new n[MAX_PLAYER_NAME];
new fsel[128];
if(fraction[playerid]==2) format(fsel,sizeof(fsel),"LSRK");
if(fraction[playerid]==3) format(fsel,sizeof(fsel),"ÌèíÇäðàâ");
if(fraction[playerid]==4) format(fsel,sizeof(fsel),"Ìýðèÿ");
if(fraction[playerid]==5) format(fsel,sizeof(fsel),"Ïîëèöèÿ");
if(fraction[playerid]==6) format(fsel,sizeof(fsel),"Ñåìüÿ Ôîðåëëè");
if(fraction[playerid]==7) format(fsel,sizeof(fsel),"Ñåìüÿ Ãóðèíî");
if(fraction[playerid]==8) format(fsel,sizeof(fsel),"Ñåìüÿ Ãðàíàäîñ");
if(fraction[playerid]==9) format(fsel,sizeof(fsel),"Êèëëåðû");
if(sscanf(param,"s",message)) return SendClientMessage(playerid,0xff0034AA,"/fr [òåêñò]");
GetPlayerName(playerid,n,MAX_PLAYER_NAME);
format(str,256,"{6EF83C}[%s]%s(%i ðàíã)ñêàçàë:%s" ,fsel,n,rank[playerid],message);
SendFractionMessage(playerid,str);
format(str2,256,"%s ñêàçàë â ðàöèþ:%s" ,n,message);
ProxDetector(5,playerid,str2,0xFFFFFFAA,0xFFFFFFAA,0xFFFFFFAA,0xFFFFFFAA,0xFFFFFFAA);
return 1;
}
Cmd,created with standart method,she is"nt working:
PHP код:
if(strcmp(cmd, "/moneys", true) == 0)
{
GivePlayerMoney(playerid,5000);
return 1;
}