What's wrong with this command?
#1

Hello I've some problem I've making a command for when someone be arrested he can use /bc but the problem is:

After someone by being arrested and using /bc They will tell him in the message Example: Rock(0) has been arrested by S.W.A.T Rock(0) They are choosing the same names in row! I don't know why BUT I need using a CIVILAN NAME and Police NAME name What's wrong? help me

PHP код:
CMD:breakcuff(playeridparams[])
{
    if(
PoliceTeam(GetPlayerSkin(playerid))) return SendClientMessage(playerid, -1"{FF0000}[NayaBOT]: {FFFFFF}You cannot use this command.");
    {
        new 
pName[MAX_PLAYER_NAME],tName[MAX_PLAYER_NAME],targetid;
        new 
string[170], ArrestReward random(15000) + 2500;
        if(
TryingArrested[targetid] == && Civilian(GetPlayerSkin(targetid)))
        {
            switch(
random(100))
            {
                case 
0..35:
                {
                    
GetPlayerName(targetidtNamesizeof(tName));
                    
KillTimer(SecdonsToJail[targetid]);
                    
TryingArrested[targetid] = 0;
                    
SetPlayerWantedLevel(targetid3);
                    
SetPlayerColor(targetidCOLOR_YELLOW);
                    
format(string,sizeof(string), "{808000}%s(%d) {FFFFFF}has {808000}escaped {FFFFFF}from his HANDCUFFS!! {808000}(Being Arrested)"tName,targetid);
                    
SendClientMessageToAll(-1string);
                    
GameTextForPlayer(targetid"~g~ESCAPED ~W~FROM ~R~ARRESTED!!"50005);
                }
                case 
36..100:
                {
                    if(
ArrestReward GetPlayerCash(playerid))
                    
GetPlayerName(targetidtNamesizeof(tName));
                    
GetPlayerName(playeridtNamesizeof(tName));
                    
TryingArrested[targetid] = 0;
                    
ResetPlayerWeapons(targetid);
                    
                    
format(stringsizeof(string), "{808000}%s(%d) {ffffff}has been {808000}ARRESTED {ffffff}by {00FFFF}S.W.A.T %s(%d){ffffff}!! Wanted Level: {00FFFF}%d."tName,targetidpName,playerid,GetPlayerWantedLevel(targetid));
                      
SendClientMessageToAll(yellowstring);
                      
                      
format(stringsizeof(string), "~y~ARRESTED BY %s(%d)~n~~W~YOU LOST ~R~$%d"pNameplayerid, -ArrestReward);
                    
GameTextForPlayer(targetidstring40005);
                    
                    
format(stringsizeof(string), "~g~ARRESTED ~y~%s(%d)~n~~W~YOU GOT ~R~$%d"tNametargetidArrestReward);
                    
GameTextForPlayer(playeridstring40005);
                    
                    
format(stringsizeof(string), "{808000}%s(%d) {ffffff}has {ff0000}failed {ffffff}to escaped from his Handcuffs!! {808000}(Being Arrested)"tName,targetid);
                    
SendClientMessageToAll(yellowstring);
                    
                    
GivePlayerMoney(targetid, -ArrestReward);
                    
GivePlayerMoney(playeridArrestReward);
                }
            }
        }
        else 
SendClientMessage(playerid, -1"{FF0000}Error: {FFFFFF}You can use this command only while being cuffed or arrested.");
    }
    return 
1;

Reply


Messages In This Thread
What's wrong with this command? - by Thanks - 10.07.2018, 23:29
Re: What's wrong with this command? - by JasonRiggs - 10.07.2018, 23:52
Re: What's wrong with this command? - by Thanks - 11.07.2018, 00:05
Re: What's wrong with this command? - by JasonRiggs - 11.07.2018, 00:23
Re: What's wrong with this command? - by Thanks - 11.07.2018, 00:31
Re: What's wrong with this command? - by Tass007 - 11.07.2018, 00:44
Re: What's wrong with this command? - by JasonRiggs - 11.07.2018, 00:46
Re: What's wrong with this command? - by Thanks - 11.07.2018, 00:50
Re: What's wrong with this command? - by Tass007 - 11.07.2018, 00:59
Re: What's wrong with this command? - by Thanks - 11.07.2018, 01:14

Forum Jump:


Users browsing this thread: 2 Guest(s)