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



textdraws - Gider - 08.09.2012

Hello . I have some problem with my textdraws in gamemode. I writing code in ZCMD command system and i have dynamic vehicle system. What is my problem? Then, i did turning on engine on key alt(after that, i had it on command /engine). When I made it on key alt and in command my textdraws are disappeared.

There is my code:

Код:
	if((newkeys==KEY_FIRE)&&(GetPlayerState(playerid) == PLAYER_STATE_DRIVER))
	{
	    cmd_silnik(playerid, "");
	    return 1;
	}

    CMD:silnik(playerid, cmdtext[])
	{
		new id = GetPlayerVehicleID(playerid),
			uid = GetVehicleUID(id);
		new string[128],
			ps[7];
		if(CanDriveVehicle(playerid, uid) && GetPlayerState(playerid)==PLAYER_STATE_DRIVER)
		{
		    if(Vehicle[uid][vEngine])
		    {
		       	TextDrawHideForPlayer(playerid, AutoNapis[playerid]);
				GetVehicleParamsEx(id, ps[0], ps[1], ps[2], ps[3], ps[4], ps[5], ps[6]);
				SetVehicleParamsEx(id, 0, 0, 0, ps[3], ps[4], ps[5], ps[6]);
				KillTimer(Vehicle[uid][vTimer]);
				Vehicle[uid][vEngine] = 0;
				GInfo(playerid,"~r~silnik wylaczony!",1);
				format(string, sizeof(string), "wyłącza silnik pojazdu %s.", Vehicle[ uid ][ vName ]);
				Me( playerid, string );
			}
			else
			{
				SetTimerEx("Silnik",3500,0,"d",playerid);
				GInfo(playerid,"~r~trwa uruchamianie silnika!",1);
				format(string, sizeof(string), "prуbuje uruchomić silnik pojazdu %s.", Vehicle[ uid ][ vName ]);
				Me( playerid, string );
			}
		}
		else Info(playerid, "Nie możesz manipulować silnikiem tego pojazdu lub nie jesteś jego kierowcą.");
		return 1;
	}