11.06.2011, 13:28
Hi all,i've a problem with /spec cmd.
It's all okay,but when a player enter in a car,i see his face...how to add the normal camera to show whole vehicle?Thanks
pawn Код:
if(strcmp(cmd, "/spec", true) == 0) {
if (GetPlayerState(playerid)==9){
whoIsHeSpectating[playerid]=-1;
TogglePlayerSpectating(playerid, 0);
SetCameraBehindPlayer(playerid);
return 1;
}
new who;
tmp = strtok(cmdtext,idx);
if (!strlen(tmp)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /spec [playerid] - Use again /spec when u want stop spectating.");
who = strval(tmp);
if (!IsPlayerConnected(who)) return SendClientMessage(playerid,COLOR_RED,"Player is offline.");
TogglePlayerSpectating(playerid, 1);
whoIsHeSpectating[playerid]=who;
SetCameraBehindPlayer(playerid);
if (IsPlayerInAnyVehicle(who)) PlayerSpectateVehicle(playerid, GetPlayerVehicleID(who));
else PlayerSpectatePlayer(playerid, who);
return 1;
}