hotwire help - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: hotwire help (
/showthread.php?tid=161836)
hotwire help -
heroyou1221 - 21.07.2010
hello. I need help with a command:
Код:
if(strcmp(cmd, "/hotwire", true) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(PlayerInfo[playerid][pJob] == 5)
{
TogglePlayerControllable(playerid, 1);
}
else
{
SendClientMessage(playerid, 0xAFAFAFAA, "* You are not a car jacker!");
}
}
else
{
SendClientMessage(playerid, 0xAFAFAFAA, "* you need to sit in the car!");
}
return 1;
}
can someone make this like /hotwire and playername is tryng to hotwire the engine but doesen't start and when you write /hotwire again then again playername is tryng to hotwire a car and engine starts. I want like this, that if your carjacking ,or whatever it is called, skill is low then the starting rate is less, if you have a higher carjacking skill you can start the car more easily and the starting rate to not starting is bigger. Hope i wrote it understanably but i really need some help. Thank you anyway.
Re: hotwire help -
Joe_ - 21.07.2010
You will need a skill varible for every player, to state their skill, and some maths.
Also this:
https://sampwiki.blast.hk/wiki/Random
Re: hotwire help -
Яσскѕтая - 21.07.2010
I got part of it for you, someone will have to finish it, I don't work with roleplay scripts so I can not finish it.
pawn Код:
if(strcmp(cmd, "/hotwire", true) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(PlayerInfo[playerid][pJob] == 5)
{
new string[256];
new name[MAX_PLAYERS];
GetPlayerName(playerid, name, sizeof(name));
TogglePlayerControllable(playerid, 1);
format(string,sizeof(string),"%s starts to hotwire a car.",name);
SendClientMessageToAll(COLOR_HERE,string);
}
else
{
SendClientMessage(playerid, 0xAFAFAFAA, "* You are not a car jacker!");
}
}
else
{
SendClientMessage(playerid, 0xAFAFAFAA, "* you need to sit in the car!");
}
return 1;
}
EDIT: The guy above posted while I was typing, do pay attention to what he said.
Re: hotwire help -
heroyou1221 - 21.07.2010
Quote:
Originally Posted by Яσскѕтая
I got part of it for you, someone will have to finish it, I don't work with roleplay scripts so I can not finish it.
pawn Код:
if(strcmp(cmd, "/hotwire", true) == 0) { if(IsPlayerInAnyVehicle(playerid)) { if(PlayerInfo[playerid][pJob] == 5) { new string[256]; new name[MAX_PLAYERS]; GetPlayerName(playerid, name, sizeof(name)); TogglePlayerControllable(playerid, 1); format(string,sizeof(string),"%s starts to hotwire a car.",name); SendClientMessageToAll(COLOR_HERE,string); } else { SendClientMessage(playerid, 0xAFAFAFAA, "* You are not a car jacker!"); } } else { SendClientMessage(playerid, 0xAFAFAFAA, "* you need to sit in the car!"); } return 1; }
EDIT: The guy above posted while I was typing, do pay attention to what he said.
|
can someone finish it i don't know about /hotwire anything