Randomly says "vehicle registered to Police Officers"
#1

Hi there. Whenever the car in my script blows up, despawns or W/E, it gets "registered to Police Officers only", and I'm not able to enter it. Any ideas?

Код:
    if (IsACopCar(vehicleid) && !ispassenger)
    {
        if(PlayerInfo[playerid][pMember] != 1)
        {
            new Float:cx, Float:cy, Float:cz;
		    GetPlayerPos(playerid, cx, cy, cz);
		    DOO_SetPlayerPos(playerid, cx,  cy, cz+3);
		    SendClientMessage(playerid,COLOR_GREY," This vehicle is reserved for Police Officers only !");
		}
    }
Reply
#2

You can not enter it ?
When you are a civ or when your a cop?
Reply
#3

Quote:
Originally Posted by RandomDude
Посмотреть сообщение
You can not enter it ?
When you are a civ or when your a cop?
Oh, sorry, the information wasn't quite accurate.

I'm a civilian, and I'm not able to enter it.
Reply
#4

Another Ravens Roleplay help question..... again this is a terrible script with horrible coding don't use it.
Reply
#5

Okay in the public Line IsACopCar, What is happening is that it is defining a type of car that will be related to the police officer pMember rank. You either need to use vehicle ID numbers that are not in the IsACopCar list or what could be happening is that it continues once a car despawns it arranges all the vehicle in a random order or your randomly respawning it to a location. Check these off first then come back to me
Reply
#6

Quote:
Originally Posted by [uL]Pottus
Посмотреть сообщение
Another Ravens Roleplay help question..... again this is a terrible script with horrible coding don't use it.
Jeez, thanks for helping me, mate. No unnecessary comments.
Reply
#7

Quote:

SendClientMessage(playerid,COLOR_GREY," This vehicle is reserved for Police Officers only !");

That is in your script the car is only for police not any civs
Reply
#8

I did help you I advised you to stop wasting your time with a script coded by monkeys riddled with bugs as soon as you get 30 - 40 players online your server will crash.
Reply
#9

This isn't Raven's Roleplay. Unless he added this whole code.

If you wish anyone to be able to enter the vehicle:

Replace:
Код:
PlayerInfo[playerid][pMember] != 1 //This is checking if they are a member of faction one (PD)
With:
Код:
IsPlayerConnected(playerid) //This will just continue (As long as they are connected to the server, which they 99.9% of the time are
*Or if you aren't new to scripting remove that whole line and make sure the indentation is correct*
Reply


Forum Jump:


Users browsing this thread: