Help convert command to ZCMD -
EdvinasStudio - 29.04.2018
Anyone can help convert it to ZCMD?
Код:
if(strcmp(cmd, "/parduoti", true) == 0)
{
tmp = strtok(cmdtext, idx);
if (!strlen(tmp))
{
SendClientMessage(playerid, 0xFFFFFFAA, " /pcarsell [playerid] [Preis]");
return 1;
}
new sellplayerid = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if (!strlen(tmp))
{
SendClientMessage(playerid, 0xFFFFFFAA, "/pcarsell [playerid] [Geld]");
return 1;
}
new preis = strval(tmp);
if (preis<0)
{
SendClientMessage(playerid, 0xFFFFFFAA, "Bloga kaina.");
return 1;
}
if (Carlist[playerid][Typ]==-1)
{
SendClientMessage(playerid, 0xFFFFFFAA, "Neturite automobilio!");
return 1;
}
if (!IsPlayerConnected(sellplayerid))
{
SendClientMessage(playerid, 0xFFFFFFAA, "Ћaidėjas atsijungęs.");
return 1;
}
bietetAn[sellplayerid][0]=playerid;
bietetAn[sellplayerid][1]=preis;
new playername[MAX_PLAYER_NAME];
new sellplayername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playername));
GetPlayerName(sellplayerid,sellplayername,sizeof(sellplayername));
format(string,128,"Ћaidėjui %s siūlote automobilį uћ %i ",sellplayername,preis);
SendClientMessage(playerid, 0xFFFFFFAA, string);
SendClientMessage(playerid, 0xFFFFFFAA, "Kad atљaukti pardavime raљykite /atsaukti.");
format(string,128,"%s siūlo automobilį %s uћ $%i .",playername,Kaufliste[Carlist[playerid][Typ]][Name],preis);
SendClientMessage(sellplayerid, 0xFFFFFFAA, string);
SendClientMessage(sellplayerid, 0xFFFFFFAA, "Jeigu jums tenkina suma raљykite /priimti.");
return 1;
}
Re: Help convert command to ZCMD -
UFF - 30.04.2018
Код:
CMD:parduoti(playerid, params[])
{
new cash;
if(sscanf(params, "ui", otherid, cash))
{
Usage(playerid, "/pcarsell [playerid] [Geld]");
return true;
}
if (cash < 0)
{
SendClientMessage(playerid, 0xFFFFFFAA, "Bloga kaina.");
return 1;
}
if(Carlist[playerid][Typ]==-1)
{
SendClientMessage(playerid, 0xFFFFFFAA, "Neturite automobilio!");
return 1;
}
if (!IsPlayerConnected(sellplayerid))
{
SendClientMessage(playerid, 0xFFFFFFAA, "Žaidejas atsijunges.");
return 1;
}
bietetAn[sellplayerid][0]=playerid;
bietetAn[sellplayerid][1]=cash;
new playername[MAX_PLAYER_NAME];
new sellplayername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playername));
GetPlayerName(sellplayerid,sellplayername,sizeof(sellplayername));
format(string,128,"Žaidejui %s siulote automobili už %i ",sellplayername,cash);
SendClientMessage(playerid, 0xFFFFFFAA, string);
SendClientMessage(playerid, 0xFFFFFFAA, "Kad atšaukti pardavime rašykite /atsaukti.");
format(string,128,"%s siulo automobili %s už $%i .",playername,Kaufliste[Carlist[playerid][Typ]][Name],cash);
SendClientMessage(sellplayerid, 0xFFFFFFAA, string);
SendClientMessage(sellplayerid, 0xFFFFFFAA, "Jeigu jums tenkina suma rašykite /priimti.");
return 1;
}
Re: Help convert command to ZCMD -
EdvinasStudio - 01.05.2018
D:\Edvinas\Laisvalaikis\RPG\gamemodes\RPG.pwn(1479 3) : error 017: undefined symbol "otherid"
D:\Edvinas\Laisvalaikis\RPG\gamemodes\RPG.pwn(1480
: error 017: undefined symbol "sellplayerid"
D:\Edvinas\Laisvalaikis\RPG\gamemodes\RPG.pwn(1481 3) : error 017: undefined symbol "sellplayerid"
D:\Edvinas\Laisvalaikis\RPG\gamemodes\RPG.pwn(1481 4) : error 017: undefined symbol "sellplayerid"
D:\Edvinas\Laisvalaikis\RPG\gamemodes\RPG.pwn(1481
: error 017: undefined symbol "sellplayerid"
D:\Edvinas\Laisvalaikis\RPG\gamemodes\RPG.pwn(1482 3) : error 017: undefined symbol "sellplayerid"
D:\Edvinas\Laisvalaikis\RPG\gamemodes\RPG.pwn(1482 4) : error 017: undefined symbol "sellplayerid"
Shows these...
Re: Help convert command to ZCMD -
Flashhiee - 01.05.2018
Neat.
pawn Код:
CMD:pcarsell(playerid, params[])
{
new sellplayerid, preis;
if(sscanf(params, "ud", sellplayerid, preis))return SendClientMessage(playerid, 0xFFFFFFAA, "/pcarsell [playerid] [Geld]");
if(preis < 1)return SendClientMessage(playerid, 0xFFFFFFAA, "Bloga kaina.");
if (Carlist[playerid][Typ]==-1)return SendClientMessage(playerid, 0xFFFFFFAA, "Neturite automobilio!");
if (!IsPlayerConnected(sellplayerid))return SendClientMessage(playerid, 0xFFFFFFAA, "Ћaidejas atsijunges.");
bietetAn[sellplayerid][0]=playerid;
bietetAn[sellplayerid][1]=preis;
new playername[MAX_PLAYER_NAME];
new sellplayername[MAX_PLAYER_NAME];
new string[128];
GetPlayerName(playerid,playername,sizeof(playername));
GetPlayerName(sellplayerid,sellplayername,sizeof(sellplayername));
format(string,128,"Ћaidejui %s siulote automobili uћ %i ",sellplayername,preis);
SendClientMessage(playerid, 0xFFFFFFAA, string);
SendClientMessage(playerid, 0xFFFFFFAA, "Kad atљaukti pardavime raљykite /atsaukti.");
format(string,128,"%s siulo automobili %s uћ $%i .",playername,Kaufliste[Carlist[playerid][Typ]][Name],preis);
SendClientMessage(sellplayerid, 0xFFFFFFAA, string);
SendClientMessage(sellplayerid, 0xFFFFFFAA, "Jeigu jums tenkina suma raљykite /priimti.");
return 1;
}