Hey Com,
Wie füge ich einen 3. Wert hinzu?
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /refill [playerid] [preis]");
return 1;
}
Es soll aber 3 machbar sein?
MfG james
Hey Com,
Wie füge ich einen 3. Wert hinzu?
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /refill [playerid] [preis]");
return 1;
}
Es soll aber 3 machbar sein?
MfG james
ich glaub es war so
einfach unterhalb nochmal einfügen
ich glaub es war so
einfach unterhalb nochmal einfügen
So
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /refill [Playerid] [Preis] [Anzahl]");
return 1;
}
tmp = strtok(idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /refill [Playerid] [Preis] [Anzahl]");
return 1;
}
ja, damit du es auch weiterverwenden kannst, musst du eine Variable benutzen.
new Preis, Anzahl;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /refill [Playerid] [Preis] [Anzahl]");
return 1;
}
Preis = strval(tmp);
tmp = strtok(idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /refill [Playerid] [Preis] [Anzahl]");
return 1;
}
Anzahl = strval(tmp);
Die habe ich ja schomn?
Edit
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pJob] !=7)
{
SendClientMessage(playerid, COLOR_GREY, " Du bist kein KFZ-Mechaniker!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /refill [Playerid] [Preis] [Anzahl]");
return 1;
}
tmp = strtok(cmdtext,idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /refill [Playerid] [Preis] [Anzahl]");
return 1;
}
new playa;
new money;
new Anzahl;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
money = strval(tmp);
Was soll ich da jez machn
if(IsPlayerConnected(playerid))
{
new playa;
new money;
new Anzahl;
if(PlayerInfo[playerid][pJob] !=7)
{
SendClientMessage(playerid, COLOR_GREY, " Du bist kein KFZ-Mechaniker!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /refill [Playerid] [Preis] [Anzahl]");
return 1;
}
playa = ReturnUser(tmp);
tmp = strtok(cmdtext,idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /refill [Playerid] [Preis] [Anzahl]");
return 1;
}
money = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /refill [Playerid] [Preis] [Anzahl]");
return 1;
}
Anzahl= strval(tmp);
so müsste es funktionieren,
bin mir aber nicht sicher
Thx
Nein geht leider nicht