First person mode - 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: First person mode (
/showthread.php?tid=397778)
First person mode -
Whizion - 06.12.2012
So i found this neat command:
if (strcmp("/firstperson", cmdtext, true, 10) == 0)
{
firstperson[playerid] = CreateObject(19300, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
AttachObjectToPlayer(firstperson[playerid],playerid, 0.0, 0.12, 0.7, 0.0, 0.0, 0.0);
AttachCameraToObject(playerid, firstperson[playerid]);
SendClientMessage(playerid,-1,"Note: Use /exitfirstperson to return to normal.");
return 1;
}
The problem is i'm using the streamer plugin and there isn't AttachDynamicObjectToPlayer.
What do i do? Or do i just leave it like this and it will be okay?
Re: First person mode -
Konstantinos - 06.12.2012
If there isn't a function like this to Incognito's plugin, then you should use it as it is. Just a note though, "/firstperson" has a lenght of 12, not 10 chars. However, it's optional but it's better not to use it at all instead of using it with a wrong way! Just:
pawn Код:
if(!strcmp(cmdtext, "/firstperson", true))
Re: First person mode -
Whizion - 07.12.2012
Okay, thanks. I'm not using strcmp anyway.