Help with Isacopcar -
ihatetn931 - 13.01.2010
Ok, i've got a question. I have cop cars for when you get in them you have to type /takecar, Now i got them set for cop vehicle models but i would also like to add carids to it, So i could set like a infernus the same way but i don't wanna set all infernus the same way, Only certian carids. Like if an infernus is id 1 2 and 4 i could set it for those ids insteald of the models, Here is my code for Isacopcar, How would i add the carids and leave the vehiclemodels. So bascially what i wanna do is, Enter carid 1 and it will say the same thing as the cop cars, Would i have to set the cop cars to modelis also or can i just add carids to this code
Код:
public IsACopCar(carid)
{
new vmod = GetVehicleModel(carid);
if((vmod == 523) || (vmod == 596) || (vmod == 597) || (vmod == 497) || (vmod == 427) || (vmod == 601) || (vmod == 490) || (vmod == 523) || (vmod == 599))
{
return 1;
}
return 0;
}
Re: Help with Isacopcar -
Toad - 13.01.2010
at the top:
gamemodeinit
Код:
infernus = CreateVehicle(411, x, y, z, a, c1, c2, respawndelay);//replace those x, y ....
whereever you want to usw it:
Код:
if(GetPlayerVehicleID(playerid) == infernus)//and continue
Re: Help with Isacopcar -
ihatetn931 - 13.01.2010
Quote:
Originally Posted by Toad
at the top:
gamemodeinit
Код:
infernus = CreateVehicle(411, x, y, z, a, c1, c2, respawndelay);//replace those x, y ....
whereever you want to usw it:
Код:
if(GetPlayerVehicleID(playerid) == infernus)//and continue
|
That would make it where i have to use /takecar like the copcars? I basically wanna set it as a cop car but i don't wanna set by models just carid
I've used somthing simliar to what you posted to set a car for only my name. Didnd't know if it would define an infernus as a cop car
Re: Help with Isacopcar -
Toad - 14.01.2010
i dont really understand what youre trying to tell me with copcar and infernus but i canb show you how to usw this infernus just for name:
at the top:
gamemodeinit
Код:
infernus = CreateVehicle(411, x, y, z, a, c1, c2, respawndelay);//replace those x, y ....
Код:
public OnPlayerEnterVehicle(playerid, vehicleid) //no other parameters? idk
{
if(vehicle == infernus)
{
new playername[24];
GetPlayerName(playerid, playername, 24);
if(strcmp(playername, "Yournamehere", true) != 0)
{
new
Float:x,
Float:y,
Float:z,
str[128];
SetPlayerPos(playerid, x, y, z);
format(str, 128, "~r~This is %s's car~n~You are not allowed to use it", "Yournamehere");
GameTextForPlayer(playerid, str, 5000, 5);
return 1;
}
}
return 1;
}
should work but untested.
Re: Help with Isacopcar -
ihatetn931 - 14.01.2010
I wanna make 3 infernuses for cops only and i want other infernuses (ones that cops won't be using) set to be driveable by anyone
1: I have /takecar for all my Current police vehilces, Only cops can /takecar
2: I have 3 Infernuses i am gonna use for a high speed unit in the police force, Now the way i have the cars set of is IsAcopcar is set for vehicle modes and not carid
3: I wanna make the 3 infernues for only cops and all the other infernuses for anyone esle
3: I wanna set 3 infernuses the same way i have with cop cars with the /takecar command, But i don't want it to set everysingle infernus that is spawned in game to have the /takecar command, Only 3 infernuses (the cops high speed units)
I know how to set cars for names, I've done it before
Re: Help with Isacopcar -
Retardedwolf - 14.01.2010
SEARCH.
http://forum.sa-mp.com/index.php?topic=116016.0
Re: Help with Isacopcar -
ihatetn931 - 15.01.2010
not i wanted but ok.
Re: Help with Isacopcar -
Retardedwolf - 15.01.2010
Quote:
Originally Posted by ihatetn931
|
You won't always find the exact thing you want.
That is why you don't just copy and paste.
Edit the script to what you want.
Код:
NOOB:"I want a point system like in that roleplay server that when you take over point you get a gun and respect points"
HELPER:"http://forum.sa-mp.com/index.php?action=pointsystem"(Just an example)
NOOB:"NONONONO I want one that gives you a gun and respect points after point"
Re: Help with Isacopcar -
ihatetn931 - 16.01.2010
I didn't copy and paste, It was allready in the scirpt. I tried setting it for the models and the ids but i got errorw or it bugged the cars