A few bugs - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: A few bugs (
/showthread.php?tid=317148)
A few bugs -
ChristofferHoffmann - 10.02.2012
So I'm working around with a gamemode, and it seems like I've discovered a few bugs which I can't seem to get fixed.
First of all, then I wanted to make sure that you could lock your cars, so I downloaded "Cali-Cars (filterscript)" but apperently the /lock only locks the car for the owner. Anyone else can enter it, and drive it.
On the other hand, then I can't get my /nos command to work for only mechanics.
Код:
if(strcmp(cmdtext, "/nos", true) == 0)
{
if(PlayerInfo[playerid][pJob] != 7)
{
new vehicleid = GetPlayerVehicleID(playerid);
AddVehicleComponent(vehicleid, 1010);
SendClientMessage(playerid,0xFFFFFFFF," You added NOS to the vehicle");
format(string, sizeof(string), "* %s added nitrous injection to the car.", sendername);
ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
return 1;
}
else
{
SendClientMessage(playerid, 0xFFFFFFF, " You're not a car mechanic!");
}
}
Re: A few bugs -
IceCube! - 10.02.2012
Код:
if(strcmp(cmdtext, "/nos", true) == 0)
{
new vehicleid = GetPlayerVehicleID(playerid);
AddVehicleComponent(vehicleid, 1010);
SendClientMessage(playerid,0xFFFFFFFF," You added NOS to the vehicle");
format(string, sizeof(string), "* %s added nitrous injection to the car.", sendername);
ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
return 1;
}
}
[/QUOTE]
And for the doors make your own use this code here...
https://sampwiki.blast.hk/wiki/GetVehicleParamsEx
Re: A few bugs -
ChristofferHoffmann - 10.02.2012
I'm not sure how GetVehicleParamsEx are going to help me.
Re: A few bugs -
ChristofferHoffmann - 10.02.2012
Also, how is the code you changed suppose to work for only mechanics, when you don't in any way makes the code tell if he got job 7/mechanic?
Re: A few bugs -
IceCube! - 10.02.2012
Learn ti read up on it then try the code and try again if not then tell me else place this on a Script Request Thread.
Also your code did already check I assumed you wanted it for all
Re: A few bugs -
ChristofferHoffmann - 10.02.2012
I don't request code, I attached my own in order for people to look at it, and tell me what was wrong. Because anyone can /nos even though I defined it should only be mechanics.