Warum geht dieser Befehl nicht??
ocmd:materialien(playerid,params[])
{
new aktion[20],string[128],string0[128];
if(PlayerInfo[playerid][pJob] == 9)
{
if(sscanf(params,"s",aktion))
{
SendClientMessage(playerid,Gelb,"[Benutze]: /materialien [arten]");
SendClientMessage(playerid,Gelb,"[Art]: deliver");
SendClientMessage(playerid,Gelb,"[Art]: get [Anzahl(maximal 10)]");
}
if(!strcmp(aktion, "deliver", true))
{
if(IsPlayerInRangeOfPoint(playerid,10.0,2471.1499,1905.8556,9.8582))
{
format(string,sizeof(string),"Du hast %i Pakete gegen %i Mats Auf der Baustelle eingelöst.",PlayerInfo[playerid][pPackete],PlayerInfo[playerid][pPackete]*50);
PlayerInfo[playerid][pMats] += PlayerInfo[playerid][pPackete]*50;
PlayerInfo[playerid][pPackete] = 0;
SendClientMessage(playerid,Gelb,string);
}
else
{
SendClientMessage(playerid,adminrot," Du bist nicht am MatsPoint LV!");
}
}
else if(!strcmp(aktion, "get", true))
{
new packete,preis;
if(IsPlayerInRangeOfPoint(playerid,10.0,-1111.4364,-1621.0780,76.3672))
{
if(sscanf(params,"sd",aktion,packete)) return SendClientMessage(playerid,adminrot,"[Benutze] /materialien get [Anzahl(maximal 10)]");
if(packete <=10)
{
preis = packete*250;
GivePlayerMoney(playerid, -preis);
PlayerInfo[playerid][pPackete] += packete;
format(string0,sizeof(string0),"[Info]: Du hast die %i pakete für $%i gekauft.",packete,preis);
SendClientMessage(playerid,Gelb,string0);
}
else
{
SendClientMessage(playerid, 0x910000FF,"Sie können maximal 10 Packete kaufen!");
}
}
}
}
else
{
SendClientMessage(playerid,Rot,"Du bist kein Waffenhändler!");
}
return 1;
}