Witam, ja dopiero zaczynam przygod? w pawno i chcia?bym si? zapyta?, bo mam tak? cmd:
[code]if(strcmp(cmd, "/kupubranie", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[UZYJ:] /kupubranie [ID Skinu]");
return 1;
}
new id = strval(tmp);
for(new i = 0; i < sizeof(Businesses); i++)
{
if (PlayerToPoint(25.0, playerid,Businesses[i][ExitX], Businesses[i][ExitY], Businesses[i][ExitZ]))
{
if(GetPlayerVirtualWorld(playerid) == i)
{
if(Businesses[i][BizType] == 6)
{
if(Businesses[i][Products] != 0)
{
if(GetPlayerCash(playerid) >= 100)
{
if(IsACopSkin(id) == 0)
{
if(IsValidSkin(id))
{
SetPlayerSkin(playerid,id);
GivePlayerCash(playerid,-100);
Businesses[i][Products]--;
Businesses[i][Till]+=100;
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "Ubranie kupione, $-100.");
SaveBusinesses();
return 1;
}
}
}
}
}
}
}
}
}
return 1;
}[/code]
I ona polega na tym ?e ja wpisuje /kupubranie [id skina] i mi si? zmienia skin. Chcia? bym zrobi? tak ?eby ka?dy skin mia? inn? cen?, lecz ... |