Spec Command bugged
#1

Код:
CMD:spec(playerid,params[])
{
    if(pInfo[playerid][pLogged] == 1)
    {
    if(pInfo[playerid][pAdminLevel] >= 1)
    {
    new id;
    if(sscanf(params,"u",id)) return SendClientMessage(playerid,COLOR_RED,"Usage: /spec <player>");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"Player is not connected!");

	TogglePlayerSpectating(playerid,1);
    PlayerSpectatePlayer(playerid,id);
    }
		else {
		SendClientMessage(playerid,-1,""chat""COL_GRUEN" You have not the sufficient privileges to use this command.");
			}
	}
		else {
	    SendClientMessage(playerid,-1,""chat" You are not logged in!");
	    Kick(playerid);
	}
	return 1;
}
The problem is that the admin die, when he use the cmd. Know everyone why?
Reply
#2

Try this. im not sure about it. but give it a try
pawn Код:
CMD:spec(playerid,params[])
{
    new id;
    if(pInfo[playerid][pLogged] == 0)
    {
        SendClientMessage(playerid,-1,""chat" You are not logged in!");
        Kick(playerid);
        return 1;
    }
    if(pInfo[playerid][pAdminLevel] < 1) return SendClientMessage(playerid,-1,""chat""COL_GRUEN" You have not the sufficient privileges to use this command.");
    if(sscanf(params,"u",id)) return SendClientMessage(playerid,COLOR_RED,"Usage: /spec <player>");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"Player is not connected!");
    TogglePlayerSpectating(playerid, 1);
    PlayerSpectatePlayer(playerid, id);
    SetPlayerInterior(playerid, GetPlayerInterior(id));
    SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(id));
    return 1;
}
Reply
#3

"undefined Symbol: Spectating Player".
Reply
#4

Try my command again.

Edited
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)