Quote:
Originally Posted by Dark_Breed
Hy there. I'm new in SAMP scripting and I need a little help with a command that I've made. It's a /engine command that starts/stops the engine of a vehicle. The problem is that the engine only starts, and I'm not able to stop it anymore. Here's the code to the command. Thanks in advance for your help!
Код:
if(strcmp(cmd, "/engine", true) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(IsPlayerConnected(playerid))
{
new engine,lights,alarm,doors,bonnet,boot,objective;
new carid = GetPlayerVehicleID(playerid);
if(engine == 0)
{
GetVehicleParamsEx(carid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(carid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
SendClientMessage(playerid, 0xFFFFFFAA, "Ai pornit motorul vehiculului. {2F991A}Engine on");
}
else if(engine == 1)
{
GetVehicleParamsEx(carid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(carid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
SendClientMessage(playerid, 0xFFFFFFAA, "Ai oprit motorul vehiculului. {2F991A}Engine off");
}
}
}
return 1;
}
|
pawn Код:
if(strcmp(cmd, "/engine", true) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(IsPlayerConnected(playerid))
{
new engine,lights,alarm,doors,bonnet,boot,objective;
new carid = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(carid,engine,lights,alarm,doors,bonnet,boot,objective);
if(engine == 0)
{
SetVehicleParamsEx(carid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
SendClientMessage(playerid, 0xFFFFFFAA, "Ai pornit motorul vehiculului. {2F991A}Engine on");
}
else
{
SetVehicleParamsEx(carid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
SendClientMessage(playerid, 0xFFFFFFAA, "Ai oprit motorul vehiculului. {2F991A}Engine off");
}
}
}
return 1;
}
Next time post in scripting help section.
Looking for a long-term partner who is capable of helping me with the development of a RP server (Non MySQL). The server is currently in early non-open Alpha stage and is of course developed from scratch. There's currently a unique textdraw-based register/login system, semi-dynamic unique vehicle system (dealerships being static, the rest dynamic), house system which is fully dynamic with a few unique maps added and a few more things.
I have been developing this server for six months now and so far I have done everything myself besides one map being made by a partner who had to quit due to school exams. I am very active and dedicate at least a few hours on the project every day, counting to hundreds of hours.
The problem is that sometimes I lack motivation and therefore I need a partner which at all times is interested in bringing the project to the next stage. The one I am looking for should be;
✶ Experienced when it comes to traditional RP SA-MP servers.
✶ Someone who is willing to dedicate a lot of his/her time on this.
✶ Able to communicate in the English language fluently.
✶ A positive person with a good spirit that is trustworthy.
✶ Someone who is not jumping from project to project.
✶ A person who is not joining for the sake of money.
✶ A person living close (4 hours +/-) from GMT + 1. -
http://24timezones.com/
✶ Able to use the SA-MP map editor by JernejL to create exteriors/interiors.
Further, there's a bonus if the person in question has the following:
♢ Artistic when it comes to creating logos, banners and other design.
♢ Have an extensive knowledge when it comes to mapping fundamentals.
♢ Have experience when it comes to websites and forums.
♢ Experience when it comes to administrating for other servers.
♢ Being able to implement small features to the script such as,
* Adding vehicles, * Creating commands, * Implementing dialogs
Feel free to add more information when you apply for this position. You will be the co-owner of the server if you help me develop it.
Please note:
Fill out all the above stars/bullet points with an added comment below each starting with a dash (-) example:
Quote:
♢ Experience when it comes to administrating for other servers.
- Yes, I have been administrating a lot of servers.
|
Then send it in a PM. I WILL CONTACT YOU IF I AM INTERESTED, IF I DID NOT CONTACT YOU WITHIN 5 WORKING DAYS YOUR APPLICATION WAS DENIED SO PLEASE REFRAIN FROM POSTING ANY FURTHER APPLICATIONS THE SAME WEEK. I will not respond to any questions asked in this thread. Thank you.