SA-MP Forums Archive
fixradio Code - 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: fixradio Code (/showthread.php?tid=66328)



fixradio Code - djdanni - 21.02.2009

hi. I am woondering if it si Script so i can do like /fixradio and the the Radio whill be back on. Like if you to to Optisions and back in the game the Radio is off and the i do /fixradio then the Radio is back on. Is that Possabole?


Re: fixradio Code - ronyx69 - 21.02.2009

You can make a cmd /fixradio, that gets the vehicle id(not model), ejects player, puts it back in the car.


Re: fixradio Code - djdanni - 21.02.2009

How is it mate? I am not good in Coding.


Re: fixradio Code - ronyx69 - 21.02.2009

Код:
if(strcmp(cmdtext, "/fixradio", true) == 0)
	{
	new fvehid;
	new Float:fx, Float:fy, Float:fz;
	fvehid=GetPlayerVehicleID(playerid);
	GetPlayerPos(playerid, Float:fx, Float:fy, Float:fz);
	SetPlayerPos(playerid, Float:fx, Float:fy, Float:fz);
	PutPlayerInVehicle(playerid, fvehid, 0);
	return 1;
	}



Re: fixradio Code - ledzep - 21.02.2009

Код:
PlayerPlaySound(playerid, 1068, 0.0, 0.0, 0.0);
Playing a sound for the player will fix the radio.