Camera pos. - 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: Camera pos. (
/showthread.php?tid=354557)
Camera pos. -
Crazyboobs - 27.06.2012
Hello!
I want to make a command like /tour.
Camera will set in 5 different positions.Camera position will change randomly after 5 seconds till the 5th camera position, after that the player will spawn .Can anyone please show me an example code, so that it is easy for me to study.
Re: Camera pos. -
Kindred - 27.06.2012
Example:
pawn Код:
new TourVariable[MAX_PLAYERS];
forward TourTimer(playerid);
new TourTimerVariable[MAX_PLAYERS];
OnPlayerConnect(playerid)
{
TourVariable[playerid] = 0;
return 1;
}
CMD:tour(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
TourTimerVariable[playerid] = SetTimerEx("message", 5000, false, "i", playerid);
SendClientMessage(playerid, -1, "You are now going through the tour!");
}
return 1;
}
public message(playerid)
{
if(TourVariable[playerid] == 0)
{
TourVariable[playerid] = 1;
//First thing
}
if(TourVariable[playerid] == 1)
{
TourVariable[playerid] = 2;
//Second thing
}
if(TourVariable[playerid] == 2)
{
TourVariable[playerid] = 3;
//Third thing
}
if(TourVariable[playerid] == 3)
{
TourVariable[playerid] = 4;
//Fourth thing
}
if(TourVariable[playerid] == 4)
{
//Fifth thing
TourVariable[playerid] = 0;
KillTimer(TourTimerVariable[playerid]);
}
return 1;
}
Hope I helped.
Re: Camera pos. -
Crazyboobs - 27.06.2012
Quote:
Originally Posted by Kindred
Example:
pawn Код:
new TourVariable[MAX_PLAYERS];
forward TourTimer(playerid);
new TourTimerVariable[MAX_PLAYERS];
OnPlayerConnect(playerid) { TourVariable[playerid] = 0; return 1; }
CMD:tour(playerid, params[]) { if(IsPlayerConnected(playerid)) { TourTimerVariable[playerid] = SetTimerEx("message", 5000, false, "i", playerid); SendClientMessage(playerid, -1, "You are now going through the tour!"); } return 1; }
public message(playerid) { if(TourVariable[playerid] == 0) { TourVariable[playerid] = 1; //First thing } if(TourVariable[playerid] == 1) { TourVariable[playerid] = 2; //Second thing } if(TourVariable[playerid] == 2) { TourVariable[playerid] = 3; //Third thing } if(TourVariable[playerid] == 3) { TourVariable[playerid] = 4; //Fourth thing } if(TourVariable[playerid] == 4) { //Fifth thing TourVariable[playerid] = 0; KillTimer(TourTimerVariable[playerid]); } return 1; }
Hope I helped.
|
Ok where i have to add SetCameraPos & SetCameraLookAt ?
Re: Camera pos. -
Kindred - 27.06.2012
Where it says this:
^^ Means first camera position, and so on.
Re: Camera pos. -
Crazyboobs - 27.06.2012
Quote:
Originally Posted by Kindred
Where it says this:
^^ Means first camera position, and so on.
|
Thank you dude
+rep
Re: Camera pos. -
Crazyboobs - 27.06.2012
Nooo!! it is not working properly, it is showing only the last camera position :S
Please anyone help