06.03.2010, 21:01
When I type /spec [playername/id] and the one I want to spec is in a vehicle, I will see him/her INSIDE the vehicle, it looks very weird. Just like cam hack, but the original SA. And I want the normal one. This is my command:
pawn Код:
dcmd_spec(playerid, params[])
{
new index = 0;
tmp2 = strtok(params, index);
if (pInfo[playerid][pAdmin] < 1)
{
SystemMessage(playerid, "You are not an Administrator with the required level.");
return 1;
}
if(!strlen(tmp2))
{
SystemMessage(playerid, "[USAGE] ''/spec [playername/id]''.");
return 1;
}
new string[MAX_STRING];
new second, minute, hour, day, month, year;
giveplayerid = ReturnUser(tmp2);
if(IsPlayerConnected(giveplayerid))
{
TogglePlayerSpectating(playerid, 1);
PlayerSpectatePlayer(playerid, giveplayerid);
SetPlayerInterior(playerid, GetPlayerInterior(giveplayerid));
gSpectateID[playerid] = giveplayerid;
gSpectateType[playerid] = ADMIN_SPEC_TYPE_PLAYER;
gettime(hour, minute, second);
getdate(year, month, day);
format(string, sizeof(string), "Player %s started spectating player %s on %d/%d/%d at %d:%d:%d.", PlayerName(playerid), PlayerName(giveplayerid), month, day, year, hour, minute, second);
ServerLog(string);
printf(string);
}
else
{
format(string, sizeof(string), "That player is not active.");
SystemMessage(playerid, string);
}
return 1;
}