(SOS) /gc 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: (SOS) /gc Help (
/showthread.php?tid=68821)
(SOS) /gc Help -
djdanni - 14.03.2009
hi. I am wondering hwo i can ad din my gm like if you do /gc you'r car wount crash. ands when you do it agen then you can crash him. Any idear?
Re: (SOS) /gc Help -
ICECOLDKILLAK8 - 14.03.2009
Explain moar pl0x
Re: (SOS) /gc Help -
djdanni - 14.03.2009
i mean like if you do /gc and you crash on somthang he is always if full life. And if you do agen /gc you can crash the car.
Re: (SOS) /gc Help -
Pyrokid - 14.03.2009
I guess /gc means godcar. Lucky for you, I have that script on hand.
At the top of your script:
pawn Код:
new ingodcar[MAX_PLAYERS];
new godv;
forward GodCarMode();
Anywhere in the script:
pawn Код:
public GodCarMode()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(ingodcar[i] == 1)
{
SetVehicleHealth(godv,3000);
}
}
}
return 1;
}
Add this command:
pawn Код:
if(strcmp(cmdtext, "/godcar", true) == 0)
{
new godct;
if(ingodcar[playerid] == 0) {
ingodcar[playerid] = 1;
SendClientMessage(playerid, COLOR_YELLOW, "God car activated");
godv = GetPlayerVehicleID(playerid);
godct = SetTimer("GodCarMode",500,1);
} else {
ingodcar[playerid] = 0;
SendClientMessage(playerid, COLOR_YELLOW, "God car de-activated");
KillTimer(godct);
}
return 1;
}
Use /godcar to turn it on and off. Lemme know if you have problems with it.
Re: (SOS) /gc Help -
djdanni - 14.03.2009
Thang you Realy Mutch that woork 100%
Re: (SOS) /gc Help -
Pyrokid - 14.03.2009
Glad I could be of service.