08.09.2009, 17:33
I have this command and is works 100%
But is only spectate the player... when the player get in car, the camare is spectate the player, and look him face.
I want make when the player enter in the car, this spectate the car...
This is possible?
Help me with this please, i dont know how make it.
pawn Код:
dcmd_spectate(playerid,params[])
{
if(PlayerData[playerid][AdminLevel] >= 1)
{
new tmp[256], idx;
tmp = strtok(params,idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOUR_WHITE, "Use: /spectate [playerid]");
return true;
}
new pid = strval(tmp);
if(!IsPlayerConnected(pid))
{
SendClientMessage(playerid, COLOUR_RED, "Error: Incorrect playerid.");
return true;
}
new string[256], pname[MAX_PLAYER_NAME];
GetPlayerName(pid, pname, sizeof(pname));
format(string, sizeof(string), "You are spectating one player", pname);
SendClientMessage(playerid, COLOUR_RED, string);
format(string, sizeof(string), "Type /spectateoff for leave spectating", pname);
SendClientMessage(playerid, COLOUR_WHITE, string);
TogglePlayerSpectating(playerid, 1);
PlayerSpectatePlayer(playerid, pid);
PlayerSpectateVehicle(playerid, pid);
return true;
}
else return false;
}
I want make when the player enter in the car, this spectate the car...
This is possible?
Help me with this please, i dont know how make it.