[Pomoc] Specplayer

Započeo |TED| Boca SRB, Mart 28, 2013, 22:52:51 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:Infernus Gaming
Detaljan opis problema:Hteo bih ako neko moze da mi popravi komandu spec ne radi
Dio skripte:
[code]CMD:specplayer(playerid, params[])
{
	new Giveplayerid, Name[256], String[256], Name2[256];
    if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pGm] >= 1)
	{
	if (sscanf(params, "d", Giveplayerid)) SendClientMessage(playerid,COLOR_WHITE, "SERVER: /specplayer [Playerid]");
	else if (!IsPlayerConnected(Giveplayerid)) SendClientMessage(playerid,COLOR_PURPLE,"Igrac nije konektovan?");
	else
	{
	if ( Specing[Giveplayerid] == 1 )
	{
	SendClientMessage(playerid, COLOR_RED, "   Osobu koju pokusavate da specujete, specuje neko drugi.");
	}
	else
	{
    GetPlayerName(playerid, Name, 256);
	GetPlayerName(Giveplayerid, Name2, 256);
	format(String, 256, "[%i] %s sada spectating [%i] %s",playerid, Name,Giveplayerid, Name2);
	CallLocalFunction("ircRemoteSay", "iss", 1, "#FSE", String);
	Specing[playerid] = 1;
	}
	if ( !IsPlayerInAnyVehicle(Giveplayerid) )
	{
	TogglePlayerSpectating(playerid, 1);
	PlayerSpectatePlayer(playerid, Giveplayerid);
	SetPlayerInterior(playerid,GetPlayerInterior(Giveplayerid));
	SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(Giveplayerid));
	return 1;
	}
	else
	{
	TogglePlayerSpectating(playerid, 1);
	PlayerSpectateVehicle(playerid, GetPlayerVehicleID(Giveplayerid));
	SetPlayerInterior(playerid,GetPlayerInterior(Giveplayerid));
	SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(Giveplayerid));
	return 1;
	}
 	}
	}
	return 1;
}
[/code]
Neke slike/video za lakse dobivanje pomoci(neobavezno)

Ovako:

Na vrh:


new IgracPosmatraIgraca[MAX_PLAYERS];


OnPlayerConnect:

IgracPosmatraIgraca[playerid] = 999;


CMD:spec(playerid, params[])
{
	if(IsPlayerAdmin(playerid))
	{
	    new igrac, hIme[MAX_PLAYER_NAME], Float:hp, izvr[MAX_PLAYER_NAME], ip[24], CmdString[128];;
	    if(sscanf(params, "u", igrac)) return SCM(playerid, 3, "Koristite: /recon [Korisnicki ID ili deo imena]");
	    if(!IsPlayerConnected(igrac)) return SCM(playerid, 2, "Taj igrac nije online!");
	    IgracPosmatraIgraca[playerid] = igrac;
	    RPIme(igrac, hIme); GetPlayerHealth(igrac, hp); RPIme(playerid, izvr); GetPlayerIp(playerid, ip, 24);
		format(CmdString, 64, " %s(%i), $%d, H: %.1f", hIme, igrac, GetPlayerMoney(igrac), hp);
		SCM(playerid, 2, CmdString);
		if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
		{
		    new f = 0;
			foreach(Player, i)
			{
				if(GetPlayerVehicleID(i) == GetPlayerVehicleID(playerid)) f++;
			}
			if(f == 0) SetVehicleToRespawn(GetPlayerVehicleID(playerid));
		}
		SetPlayerInterior(playerid, GetPlayerInterior(igrac));
		SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(igrac));
		TogglePlayerSpectating(playerid, 1);
		if(IsPlayerInAnyVehicle(igrac)) PlayerSpectateVehicle(playerid, GetPlayerVehicleID(igrac));
		else PlayerSpectatePlayer(playerid, igrac);
	}
	else return SCM(playerid, GRAD2, "Samo admini");
	return 1;
}
CMD:uncon(playerid, params[])
{
	if(IsPlayerAdmin(playerid))
	{
     	TogglePlayerSpectating_H(playerid, 0);
      	SpawnPlayer(playerid);
	}
	else return SCM(playerid, GRAD2, "Samo admin");
	return 1;
}
BIG RESPEKT: Blaeks,  [CRP] Joey_, David (Sabljak) A.k.A SABO(T), joXy_, Dimi, Sexserghy ♥, TerminuS, H1TM4N


Citat: FlasH poslato Mart 28, 2013, 23:07:23 POSLE PODNE
Ovako:

Na vrh:


new IgracPosmatraIgraca[MAX_PLAYERS];


OnPlayerConnect:

IgracPosmatraIgraca[playerid] = 999;


CMD:spec(playerid, params[])
{
	if(IsPlayerAdmin(playerid))
	{
	    new igrac, hIme[MAX_PLAYER_NAME], Float:hp, izvr[MAX_PLAYER_NAME], ip[24], CmdString[128];;
	    if(sscanf(params, "u", igrac)) return SCM(playerid, 3, "Koristite: /recon [Korisnicki ID ili deo imena]");
	    if(!IsPlayerConnected(igrac)) return SCM(playerid, 2, "Taj igrac nije online!");
	    IgracPosmatraIgraca[playerid] = igrac;
	    RPIme(igrac, hIme); GetPlayerHealth(igrac, hp); RPIme(playerid, izvr); GetPlayerIp(playerid, ip, 24);
		format(CmdString, 64, " %s(%i), $%d, H: %.1f", hIme, igrac, GetPlayerMoney(igrac), hp);
		SCM(playerid, 2, CmdString);
		if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
		{
		    new f = 0;
			foreach(Player, i)
			{
				if(GetPlayerVehicleID(i) == GetPlayerVehicleID(playerid)) f++;
			}
			if(f == 0) SetVehicleToRespawn(GetPlayerVehicleID(playerid));
		}
		SetPlayerInterior(playerid, GetPlayerInterior(igrac));
		SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(igrac));
		TogglePlayerSpectating(playerid, 1);
		if(IsPlayerInAnyVehicle(igrac)) PlayerSpectateVehicle(playerid, GetPlayerVehicleID(igrac));
		else PlayerSpectatePlayer(playerid, igrac);
	}
	else return SCM(playerid, GRAD2, "Samo admini");
	return 1;
}
CMD:uncon(playerid, params[])
{
	if(IsPlayerAdmin(playerid))
	{
     	TogglePlayerSpectating_H(playerid, 0);
      	SpawnPlayer(playerid);
	}
	else return SCM(playerid, GRAD2, "Samo admin");
	return 1;
}

6 erora brate :D
C:\DOCUME~1\boris\Desktop\Boca\TOTALW~1\GAMEMO~1\IG.pwn(19303) : error 036: empty statement
C:\DOCUME~1\boris\Desktop\Boca\TOTALW~1\GAMEMO~1\IG.pwn(19307) : error 017: undefined symbol "RPIme"
C:\DOCUME~1\boris\Desktop\Boca\TOTALW~1\GAMEMO~1\IG.pwn(19307) : error 017: undefined symbol "RPIme"
C:\DOCUME~1\boris\Desktop\Boca\TOTALW~1\GAMEMO~1\IG.pwn(19325) : error 017: undefined symbol "GRAD2"
C:\DOCUME~1\boris\Desktop\Boca\TOTALW~1\GAMEMO~1\IG.pwn(19332) : error 017: undefined symbol "TogglePlayerSpectating_H"
C:\DOCUME~1\boris\Desktop\Boca\TOTALW~1\GAMEMO~1\IG.pwn(19335) : error 017: undefined symbol "GRAD2"

19307
RPIme(igrac, hIme); GetPlayerHealth(igrac, hp); RPIme(playerid, izvr); GetPlayerIp(playerid, ip, 24);

19303
new igrac, hIme[MAX_PLAYER_NAME], Float:hp, izvr[MAX_PLAYER_NAME], ip[24], CmdString[128];;

19325
else return SCM(playerid, GRAD2, "Samo admini");

19332
TogglePlayerSpectating_H(playerid, 0);


Zašto ne napraviš ovo od Blaeks.

Vrh:

#define GRAD1 0xB4B5B7FF


stock RPIme(playerid, Ime[MAX_PLAYER_NAME])
{
    GetPlayerName(playerid, Ime, sizeof(Ime));
    for(new x = 0; x < sizeof(Ime); x++) { if(Ime[x] == '_') Ime[x] = ' '; }
    return 1;
}



TogglePlayerSpectating_H zamjeni sa TogglePlayerSpectating
BIG RESPEKT: Blaeks,  [CRP] Joey_, David (Sabljak) A.k.A SABO(T), joXy_, Dimi, Sexserghy ♥, TerminuS, H1TM4N