Need Help With My Car Wanted System =reputaion
#1

hello guys i am having a problem that when ever i enter a vehicle it shows me this message *CRIME* Vehicle Theft - Wanted Level 0.Please Help Me U Show This Message Only When I Get Wanted By Sitting In Car Like *CRIME* Vehicle Theft - Wanted Level 1 ooh How i can make u understand my problem listen first when every i sit in vehicle it gives me wanted level 1 so i thought that i should install a 5 out of 1 change of getting wanted so i done it but now when every i sit in it shows me this message *CRIME* Vehicle Theft - Wanted Level 0Even If My Wanted Level Are Not Increased However It Gives Me This message *CRIME* Vehicle Theft - Wanted Level 1 and increase my wanted level by 1.i mean to say that i want this message to be shown only when my wanted level increase.

My Code In Which i Am having Problem
Код:
   default:
            {
                SendClientMessage(playerid, yellow, "** - VEHICLE CMDS: /lock (Lock the vehicle) - /cw (Send a message to the passengers in your car) - /ej (Eject a player from your vehicle) - /ejall (Eject all passengers from your vehicle)**");
                new string[64];
                if(random(6) < 1)
                {
                    SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid)+1);
                }
                format(string, sizeof(string), "*CRIME* Vehicle Theft - Wanted Level %d", GetPlayerWantedLevel(playerid));
                SendClientMessage(playerid, red, string);
            }
        }
    }
Reply
#2

Please Help me Guys
Reply
#3

Im sorry but i dont understand fully what you said and also you should show little more of your code.
Reply
#4

Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER && gTeam[playerid] != TEAM_COP)
    {
        switch(GetVehicleModel(GetPlayerVehicleID(playerid)))
        {
            case 497, 447, 523, 416, 433, 427, 490, 528, 407, 544, 596, 597, 598, 599, 432, 601, 470, 472, 430, 428:
            {
                SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid)+4);
                SendClientMessage(playerid, yellow, "** - VEHICLE CMDS: /lock (Lock the vehicle) - /cw (Send a message to the passengers in your car) - /ej (Eject a player from your vehicle) - /ejall (Eject all passengers from your vehicle)**");
                new string[64];
                format(string, sizeof(string), "- CRIME - Law Enforcement Vehicle Theft - Wanted Level %d ", GetPlayerWantedLevel(playerid));
                SendClientMessage(playerid, red, string);
                for(new i=0;i<MAX_PLAYERS;i++)
                {
                if(!IsPlayerConnected(i))continue;
                if(gTeam[i] == TEAM_COP)
                {
                new copmsg[170];
                new name[MAX_PLAYER_NAME];
                GetPlayerName(playerid, name, sizeof(name));
                format(copmsg, sizeof(copmsg), "- WARNING ALL COPS: Law Enforcement Vehicle Theft By %s (%d)",name,playerid);
                SendClientMessage(i, COLOR_BLUE, copmsg);
                }
                }
            }
            default:
            {
                SendClientMessage(playerid, yellow, "** - VEHICLE CMDS: /lock (Lock the vehicle) - /cw (Send a message to the passengers in your car) - /ej (Eject a player from your vehicle) - /ejall (Eject all passengers from your vehicle)**");
                new string[64];
                if(random(6) < 1)
                {
                    SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid)+1);
                }
                format(string, sizeof(string), "*CRIME* Vehicle Theft - Wanted Level %d", GetPlayerWantedLevel(playerid));
                SendClientMessage(playerid, red, string);
            }
        }
    }


    if(newstate == 2)
	{
        if(LockVeh[playerid] == true)
        {
        GameTextForPlayer(playerid, "~g~Vehicle Unlocked. Use /lock to lock it.", 5000, 5);
        SendClientMessage(playerid,yellow,"Vehicle unlocked.Use /lock to lock it.");
        LockVeh[playerid] = false;
    }
        }
    return 1;
}
I Want to say that i want the message to come up only when my wanted level increase not all time when i sit in vehicle
Reply
#5

Please Help Me Up Guys
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)