hi Leute habe ein Problem mit mein CMD
also ich habe das so gemacht meiner Meinung
nach das Cop Army,FIB /ticket machen können,
jetzt ist das aber so wenn ich Cop bin das das mache steht da
das ich kein Cop bin
PS:das ist GF
if(strcmp(cmd, "/ticket", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pLeader]==1 || PlayerInfo[playerid][pMember]==1 || PlayerInfo[playerid][pMember]==3 || PlayerInfo[playerid][pLeader]==3 || PlayerInfo[playerid][pMember]==2 || PlayerInfo[playerid][pLeader]==2)
{
SendClientMessage(playerid, COLOR_GREY, "Du bist kein Cop oder bist nicht in Dienst!");
return 1;
}
if(OnDuty[playerid] != 1 && PlayerInfo[playerid][pMember] == 1)
{
SendClientMessage(playerid, COLOR_GREY, " You are not on Duty!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "/ticket [playerid/PartOfName] [Preis] [Grund]");
return 1;
}
giveplayerid = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "/ticket [playerid/PartOfName] [Preis] [Grund]");
return 1;
}
moneys = strval(tmp);
if(moneys < 1 || moneys > 100000) { SendClientMessage(playerid, COLOR_GREY, " Du kannst nur ein Ticket von 1$ bis 100000$ Setzen !"); return 1; }
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if (ProxDetectorS(8.0, playerid, giveplayerid))
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
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, "USAGE: /ticket [playerid/PartOfName] [price] [reason]");
return 1;
}
format(string, sizeof(string), "Du Gips %s ein Ticket von $%d , Grund: %s ", giveplayer, moneys, (result));
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Officer %s Gibt dir ein Ticket von $%d, Grund: %s", sendername, moneys, (result));
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, "*Um das Ticket anzunehmen: /accept ticket");
TicketOffer[giveplayerid] = playerid;
TicketMoney[giveplayerid] = moneys;
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Dieser Spieler ist nicht in deiner Nähe!");
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Dieser User ist Offline !");
return 1;
}
}
return 1;
}