Započeo [NG | RP] Almir
•29. Avg. 2012.[Pomoc] Nepoznata CMD
308
pregleda
2
postova
Crime Lord
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
240 / 250 XP
Početnik(0)
839
Postovi:
195
Teme:
Pridružio se:Jul 2012
29. Avg. 2012.
Skripta koju koristim: Classic Life
ProblemPa nesto sam trazio po skripti kad nadje ovu komandu ona nije bila stavljena u funkciju jer je /* */ pa sad sam ja nju stavio u funkciju al ne znam cemu sluzi mozel mi neko pojastniti kako da radim sa ovom CMD?
Dio skripte:
Slike://
ProblemPa nesto sam trazio po skripti kad nadje ovu komandu ona nije bila stavljena u funkciju jer je /* */ pa sad sam ja nju stavio u funkciju al ne znam cemu sluzi mozel mi neko pojastniti kako da radim sa ovom CMD?
Dio skripte:
if(strcmp(cmd, "/setfamily", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo < 4)
{
SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "Koriscenje: /setfamily ");
SendClientMessage(playerid, COLOR_GRAD4, "|1 Members");
return 1;
}
new family;
family = strval(tmp);
if(family < 1 || family > 10) { SendClientMessage(playerid, COLOR_GREY, " FamilyNr can't be below 1 or above 10 !"); return 1; }
family -= 1;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "Koriscenje: /setfamily ");
SendClientMessage(playerid, COLOR_GRAD4, "|1 Members");
return 1;
}
new stat;
stat = strval(tmp);
if(stat < 1 || stat > 1) { SendClientMessage(playerid, COLOR_GREY, " Stat Code can't be below 1 or above 1 !"); return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "Koriscenje: /setfamily ");
SendClientMessage(playerid, COLOR_GRAD4, "|1 Members");
return 1;
}
new amount;
amount = strval(tmp);
if(amount < 1 || amount > 10) { SendClientMessage(playerid, COLOR_GREY, " Amount can't be below 1 or above 10 !"); return 1; }
switch (stat)
{
case 1:
{
FamilyInfo = amount;
format(string, sizeof(string), " Family %s set to %d members", FamilyInfo, amount);
}
default:
{
format(string, sizeof(string), " Invalid Stat Code");
}
}
SendClientMessage(playerid, COLOR_GREY, string);
}
return 1;
}Slike://
Crime Lord
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
240 / 250 XP
Početnik(0)
839
Postovi:
195
Teme:
Pridružio se:Jul 2012
Morate biti prijavljeni da biste odgovorili na ovu temu.
Prijava