hey ich habe mit %s und inputtext versucht das was er schreibt auszulesen doch ich bekomme es nicht hin
if(strcmp(cmd, "/w", true) == 0 || strcmp(cmd, "/wisper", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] == 0)
{
SendClientMessage(playerid, COLOR_GREY, " Du bist kein Admin !");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Benutze: (w)isper [playerid/PartOfName] [Flüstern text]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(HidePM[giveplayerid] > 0)
{
SendClientMessage(playerid, COLOR_GREY, " Der zocker ist blokird !");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
if(giveplayerid == playerid)
{
format(string, sizeof(string), "* %s der zocker ist gemuttet.", sendername);
ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "Benutze: (/w)isper [playerid/PartOfName] [Flüstern text]");
return 1;
}
format(string, sizeof(string), "Admin %s(ID: %d) sagt zu dir: %s", sendername, playerid, (result));
SendClientMessage(giveplayerid, COLOR_YELLOW, string);
format(string, sizeof(string), " Du sagst %s(ID: %d) %s", giveplayer, giveplayerid, inputtext); //hier soll es ausgelesen werden
SendClientMessage(playerid, COLOR_YELLOW, string);
SBizzInfo[2][sbTill] += txtcost / 2;
ExtortionSBiz(2, txtcost / 2);
return 1;
}
}
else
{
format(string, sizeof(string), " %d ist kein aktiver zocker.", giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}