kann mir einer sagen wie man /ticket [id] in nur 1 drücken ändern kann?
Also, dass man dann den Verbrecher frag der am nähsten is ob er ein ticket zahlen will?
ZitatAlles anzeigendcmd_ticket(playerid,params[])
{
new string[128];
new ID;
if(sscanf(params, "u", ID))
{
SendClientMessage(playerid,COLOR_ERROR,"USAGE: /ticket (Player Name/ID)");
return 1;
}
if(IsKidnapped[playerid] == 1)
{
SendClientMessage(playerid,COLOR_ERROR,"You are kidnapped. You cannot use this command.");
return 1;
}
if(IsSpawned[playerid] != 1)
{
SendClientMessage(playerid,COLOR_ERROR,"You must be alive and spawned in order to be able to use this command.");
return 1;
}
if(IsFrozen[playerid] == 1)
{
SendClientMessage(playerid,COLOR_ERROR,"You have been frozen by a Server Administrator. You cannot use this command.");
return 1;
}
if(gTeam[playerid] != TEAM_COP && gTeam[playerid] != TEAM_ARMY && gTeam[playerid] != TEAM_CIA)
{
SendClientMessage(playerid,COLOR_ERROR,"Only law enforcement can issue tickets to suspects.");
return 1;
}
if(InAdminMode[ID] == 1)
{
SendClientMessage(playerid,COLOR_ERROR,"You cannot use this command on this player because they are in Administrator mode.");
return 1;
}
if(!IsPlayerConnected(ID))
{
format(string,sizeof(string),"The player ID (%d) is not connected to the server. You cannot issue them a ticket.",ID);
SendClientMessage(playerid,COLOR_ERROR,string);
return 1;
}
if(GetPlayerWantedLevel(ID) >= 4)
{
SendClientMessage(playerid,COLOR_ERROR,"You cannot give this player a ticket, you must /cuff this player and then /arrest them.");
return 1;
}
if(GetDistanceBetweenPlayers(playerid,ID) >
{
format(string,sizeof(string),"%s(%d) is too far away. You cannot issue them a ticket. Get closer.",PlayerName(ID),ID);
SendClientMessage(playerid,COLOR_ERROR,string);
return 1;
}
SendClientMessage(ID,COLOR_DEADCONNECT,"[[_Fined_]]");
format(string,sizeof(string),"Law Enforcement Officer %s(%d) has issued you a ticket of $2000 for your criminal actions.",PlayerName(playerid),playerid);
SendClientMessage(ID,COLOR_DODGERBLUE,string);
SendClientMessage(ID,COLOR_DODGERBLUE,"You have 2 minutes to pay this ticket with /payticket or your wanted level will increase.");
HasTicket[ID] =1;
TimeToPayTicket[ID] =120;
TextDrawSetString(MessageTD[ID],"TICKET RECIEVED");
TextDrawShowForPlayer(ID,MessageTD[ID]);
MessageTDTime[ID] =5;
IncreasePlayerScore(playerid,1);
format(string,sizeof(string),"[POLICE RADIO] Law Enforcement Officer %s(%d) has issued a ticket of $2000 to %s(%d).",PlayerName(playerid),playerid,PlayerName(ID),ID);
SendClientMessageToAllCops(string);
return 1;
}