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



Npc recording - mroq98 - 06.12.2017

This code doesn't work for me, samp ver. 0.3.7 - what's wrong?

Код:
CMD:record(playerid, params[])
{
	if(isnull(params)) return Msg(playerid, "{ff0000}Usage: /record [name]");
    if(GetPlayerState(playerid) == 1)
    {
    	StartRecordingPlayerData(playerid, PLAYER_RECORDING_TYPE_ONFOOT, params);
    	Msg(playerid, "{ff0000}Record start %s (onfoot). If u want stop /stoprecord", params);
	}
	else if(GetPlayerState(playerid) == 2)
	{
    	StartRecordingPlayerData(playerid, PLAYER_RECORDING_TYPE_DRIVER, params); 
		Msg(playerid, "{ff0000}Record start %s (in vehicle). If u want stop /stoprecord", params);
	}
	return 1;
}

CMD:stoprecord(playerid)
{
    StopRecordingPlayerData(playerid);
	Msg(playerid, "{ff0000}Record stop.");
	return 1;
}