Hier der Script
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
#if defined FILTERSCRIPT
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(givemoney,9,cmdtext);
return 0;
}
dcmd_givemoney(playerid,params[])
{
new moneyid, moneyamount;
if(sscanf(params,"dd",moneyid,moneyamount))
{
SendClientMessage(playerid,0xFF0000FF," [FEHLER]: /givemoney [id] [money] ");
}
else if(!IsPlayerConnected(moneyid))
{
SendClientMessage(playerid,0xFF0000FF," Spieler nicht gefunden!");
}
else if(moneyamount < 1 || moneyamount > 9999)
{
SendClientMessage(playerid,0xFF0000FF," Summe ungültig!");
}
else
{
GivePlayerMoney(moneyid,moneyamount);
GivePlayerMoney(playerid,-moneyamount);
}
return 1;
}
Habe ein Tutorial gelesen das Command mit Parametern habe aber
ein Problem und zwar habe ich immer den
Error :
if(sscanf(params,"dd",moneyid,moneyamount))
C:\PROGRA~1\GTASAN~1\GTASAN~1\SAMP03~1\GAMEMO~1\UNTITL~1.PWN(98) :
error 017: undefined symbol "sscanf"
was muss ich da machen hab da
nichts im Tut gefunden ...
MFG bad_company