Skripta: CLRP
Problem: Kad kucam /iznuda i postavim nekog za iznudu komanda radi ali uz to mi nepotrebno doÄ'e i server unknown command nezz zbog cega?
Dio Skripte:
if(strcmp(cmd, "/iznuda", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new bouse = PlayerInfo[playerid][pPbiskey];
if (bouse == 255)
{
SendClientMessage(playerid, COLOR_GRAD2, "Ne posedujete biznis");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "Koristi: /iznuda [playerid/Dio Imena] (ili 555 za Niko)");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
for(new b = 0; b < sizeof(SBizzInfo); b++)
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), ""COL_YELLOW"Dali ste iznudu: %s-u. ",giveplayer);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), ""COL_YELLOW"%s vam je dao iznudu svoje firme.",sendername);
DateProp(playerid);
OnPropUpdate();
OnPropTextdrawUpdate(3, b);
SendClientMessage(giveplayerid, COLOR_WHITE, string);
if (bouse >= 100)
{
format(string, sizeof(string), "%s",giveplayer);
strmid(SBizzInfo[bouse-100][sbExtortion], string, 0, sizeof(string), 255);
format(string, sizeof(string), "iznuda uzima %s",SBizzInfo[bouse-100][sbExtortion]);
OnPropTextdrawUpdate(3, bouse);
}
else
{
format(string, sizeof(string), "%s",giveplayer);
strmid(BizzInfo[bouse][bExtortion], string, 0, sizeof(string), 255);
format(string, sizeof(string), "iznuda uzima %s",BizzInfo[bouse][bExtortion]);
OnPropTextdrawUpdate(2, bouse);
}
OnPropUpdate();
SendClientMessage(playerid, COLOR_WHITE, string);
}
}
else if(giveplayerid == 555)
{
if (bouse >= 100)
{
format(string, sizeof(string), "Niko");
strmid(SBizzInfo[bouse-100][sbExtortion], string, 0, sizeof(string), 255);
format(string, sizeof(string), "iznuda uzima %s",SBizzInfo[bouse-100][sbExtortion]);
}
else
{
format(string, sizeof(string), "Niko");
strmid(BizzInfo[bouse][bExtortion], string, 0, sizeof(string), 255);
format(string, sizeof(string), "iznuda uzima %s",BizzInfo[bouse][bExtortion]);
}
OnPropUpdate();
SendClientMessage(playerid, COLOR_WHITE, string);
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Igrac je offline !");
return 1;
}
}
return 1;
}
Slike// Video//
meni se to isto dogaÄ'a sa /rentmoto,komanda normalno radi ali se pojavi isto "server unknow commande" ima netko da zna kako da maknemo to da ne otvaram sad novu temu
Probaj ovak':
if(strcmp(cmd, "/iznuda", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new bouse = PlayerInfo[playerid][pPbiskey];
if (bouse == 255)
{
SendClientMessage(playerid, COLOR_GRAD2, "Ne posedujete biznis");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "Koristi: /iznuda [playerid/Dio Imena] (ili 555 za Niko)");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
for(new b = 0; b < sizeof(SBizzInfo); b++)
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), ""COL_YELLOW"Dali ste iznudu: %s-u. ",giveplayer);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), ""COL_YELLOW"%s vam je dao iznudu svoje firme.",sendername);
DateProp(playerid);
OnPropUpdate();
OnPropTextdrawUpdate(3, b);
SendClientMessage(giveplayerid, COLOR_WHITE, string);
if (bouse >= 100)
{
format(string, sizeof(string), "%s",giveplayer);
strmid(SBizzInfo[bouse-100][sbExtortion], string, 0, sizeof(string), 255);
format(string, sizeof(string), "iznuda uzima %s",SBizzInfo[bouse-100][sbExtortion]);
OnPropTextdrawUpdate(3, bouse);
}
else
{
format(string, sizeof(string), "%s",giveplayer);
strmid(BizzInfo[bouse][bExtortion], string, 0, sizeof(string), 255);
format(string, sizeof(string), "iznuda uzima %s",BizzInfo[bouse][bExtortion]);
OnPropTextdrawUpdate(2, bouse);
}
OnPropUpdate();
SendClientMessage(playerid, COLOR_WHITE, string);
}
}
else if(giveplayerid == 555)
{
if (bouse >= 100)
{
format(string, sizeof(string), "Niko");
strmid(SBizzInfo[bouse-100][sbExtortion], string, 0, sizeof(string), 255);
format(string, sizeof(string), "iznuda uzima %s",SBizzInfo[bouse-100][sbExtortion]);
}
else
{
format(string, sizeof(string), "Niko");
strmid(BizzInfo[bouse][bExtortion], string, 0, sizeof(string), 255);
format(string, sizeof(string), "iznuda uzima %s",BizzInfo[bouse][bExtortion]);
}
OnPropUpdate();
SendClientMessage(playerid, COLOR_WHITE, string);
}
else SendClientMessage(playerid, COLOR_GREY, " Igrac je offline !");
}
return 1;
}