[POMOC] Komanda /recon

Započeo sedin007, Jul 29, 2011, 12:59:37 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Ovako ova komanda ima ubacena na srw ali ne radi evo kod pa ako mozete da mi ispravite gresku ?
/*CMD:recon(playerid, params[])
	{
		new igrac;
		if(sscanf(params, "u", igrac))
			{
				if(PlayerInfo[playerid][pAdmin] >= 1)
					{
						SCM(playerid, COLOR_GRAD2, "{168BFF}INFO: {959561} /recon {959561}[ID/DioImena]");
						return 1;
					}
			}
		else
		{
			if(PlayerInfo[playerid][pAdmin] >= 1)
					{
						  if(IsPlayerConnected(igrac))
							{
								if(WatchingTV[playerid] == 1)
									{
										WatchingTV[playerid] = 0;
										Spectate[playerid] = 253;
										GameTextForPlayer(playerid, "~w~Recon ~n~~r~Iskljucen", 5000, 6);
										PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
										SetCamBack(playerid);
										//TextDrawHideForAll(reconime[playerid]);
	TextDrawDestroy(reconime[playerid]);TextDrawDestroy(reconime1[playerid]);
	//TextDrawHideForAll(reconlvl[playerid]);
	TextDrawDestroy(reconlvl[playerid]);
	//TextDrawHideForAll(reconhpl[playerid]);
	TextDrawDestroy(reconhpl[playerid]);
	//TextDrawHideForAll(reconnovac[playerid]);
	TextDrawDestroy(reconnovac[playerid]);
	//TextDrawHideForAll(reconip[playerid]);
	//TextDrawDestroy(reconip[playerid]);
	//TextDrawHideForAll(reconsati[playerid]);
	TextDrawDestroy(reconsati[playerid]);
										//TextDrawHideForPlayer(playerid, reconime[playerid]);
												TextDrawHideForPlayer(playerid, reconlvl[playerid]);
												TextDrawHideForPlayer(playerid, reconhpl[playerid]);
												TextDrawHideForPlayer(playerid, reconnovac[playerid]);
												//TextDrawShowForPlayer(playerid, reconip[playerid]);
												TextDrawHideForPlayer(playerid, reconsati[playerid]);
									}
									else
									{
												new giveplayer[MAX_PLAYER_NAME];
												Spectate[playerid] = igrac;
												new Float:health, string[128];
												GetPlayerHealth(Spectate[playerid], health);
												GetPlayerName(Spectate[playerid], giveplayer, sizeof(giveplayer));
												new cash =  GetPlayerCash(Spectate[playerid]);
												WatchingTV[playerid] = 1;
												reconime1[playerid] = TextDrawCreate(200.000000, 290.000000, "~r~Ahmo Lindo");
	TextDrawBackgroundColor(reconime1[playerid], 255);
	TextDrawFont(reconime1[playerid], 2);
	TextDrawLetterSize(reconime1[playerid], 0.610000, 3.700000);
	TextDrawColor(reconime1[playerid], -1);
	TextDrawSetOutline(reconime1[playerid], 1);
	TextDrawSetProportional(reconime1[playerid], 1);
	TextDrawUseBox(reconime1[playerid], 1);
	TextDrawBoxColor(reconime1[playerid], 62);
	TextDrawTextSize(reconime1[playerid], 480.000000, 0.000000);
												
												
												
										reconime[playerid] = TextDrawCreate(200.000000, 290.000000, "~r~Ahmo Lindo");
	TextDrawBackgroundColor(reconime[playerid], 255);
	TextDrawFont(reconime[playerid], 2);
	TextDrawLetterSize(reconime[playerid], 0.610000, 3.700000);
	TextDrawColor(reconime[playerid], -1);
	TextDrawSetOutline(reconime[playerid], 1);
	TextDrawSetProportional(reconime[playerid], 1);
	TextDrawUseBox(reconime[playerid], 1);
	TextDrawBoxColor(reconime[playerid], 62);
	TextDrawTextSize(reconime[playerid], 480.000000, 0.000000);

	reconlvl[playerid] = TextDrawCreate(200.000000, 328.000000, "~g~Level:~b~5");
	TextDrawBackgroundColor(reconlvl[playerid], 255);
	TextDrawFont(reconlvl[playerid], 2);
	TextDrawLetterSize(reconlvl[playerid], 0.409999, 2.700000);
	TextDrawColor(reconlvl[playerid], -1);
	TextDrawSetOutline(reconlvl[playerid], 1);
	TextDrawSetProportional(reconlvl[playerid], 1);
	TextDrawUseBox(reconlvl[playerid], 1);
	TextDrawBoxColor(reconlvl[playerid], 62);
	TextDrawTextSize(reconlvl[playerid], 480.000000, 0.000000);

	reconhpl[playerid] = TextDrawCreate(412.000000, 328.000000, "~g~HP:~r~85");
	TextDrawBackgroundColor(reconhpl[playerid], 255);
	TextDrawFont(reconhpl[playerid], 2);
	TextDrawLetterSize(reconhpl[playerid], 0.409999, 2.700000);
	TextDrawColor(reconhpl[playerid], -1);
	TextDrawSetOutline(reconhpl[playerid], 1);
	TextDrawSetProportional(reconhpl[playerid], 1);

	reconnovac[playerid] = TextDrawCreate(255.000000, 357.000000, "~b~Novac:~g~10000000$");
	TextDrawBackgroundColor(reconnovac[playerid], 255);
	TextDrawFont(reconnovac[playerid], 2);
	TextDrawLetterSize(reconnovac[playerid], 0.409999, 2.700000);
	TextDrawColor(reconnovac[playerid], -1);
	TextDrawSetOutline(reconnovac[playerid], 1);
	TextDrawSetProportional(reconnovac[playerid], 1);
	TextDrawUseBox(reconnovac[playerid], 1);
	TextDrawBoxColor(reconnovac[playerid], 62);
	TextDrawTextSize(reconnovac[playerid], 420.000000, 1.000000);


	reconsati[playerid] = TextDrawCreate(290.000000, 330.000000, "~b~Sati igranja:~g~1085");
	TextDrawBackgroundColor(reconsati[playerid], 255);
	TextDrawFont(reconsati[playerid], 2);
	TextDrawLetterSize(reconsati[playerid], 0.230000, 2.300000);
	TextDrawColor(reconsati[playerid], -1);
	TextDrawSetOutline(reconsati[playerid], 1);
	TextDrawSetProportional(reconsati[playerid], 1);
												TextDrawShowForPlayer(playerid, reconime[playerid]);
												TextDrawShowForPlayer(playerid, reconlvl[playerid]);
												TextDrawShowForPlayer(playerid, reconhpl[playerid]);
												TextDrawShowForPlayer(playerid, reconnovac[playerid]);
										
												//TextDrawShowForPlayer(playerid, reconip[playerid]);
												TextDrawShowForPlayer(playerid, reconsati[playerid]);
												format(string, sizeof(string),"~r~%s~b~[ID:~y~%d~b~]",giveplayer, Spectate[playerid]);
												TextDrawSetString(reconime[playerid], string);
												format(string, sizeof(string),"~y~Level:~g~%d",PlayerInfo[Spectate[playerid]][pLevel]);
												TextDrawSetString(reconlvl[playerid], string);
												format(string, sizeof(string),"~r~HP:~g~%.0f",health);
												TextDrawSetString(reconhpl[playerid], string);
												format(string, sizeof(string),"~y~Novac:~g~%d$",cash);
												TextDrawSetString(reconnovac[playerid], string);
												format(string, sizeof(string),"~r~Sati Igranja:~b~%d",PlayerInfo[Spectate[playerid]][pConnectTime]);
												TextDrawSetString(reconsati[playerid], string);
										}
									}
								}
							}
						return 1;
					}
	
	CMD:recon(playerid, params[])
	{
		new giveplayer[MAX_PLAYER_NAME];
		new string[128];
		new idx;
		 
	    if(IsPlayerConnected(playerid))
	    {
			temp = strtok(params, idx);
			if(strcmp("off", temp, true, strlen(temp)) == 0)
			{
			    if(WatchingTV[playerid] > 0)
			    {
			        WatchingTV[playerid] = 0;
					Spectate[playerid] = 253;
					GameTextForPlayer(playerid, "~w~Recon ~n~~r~Iskljucen", 5000, 6);
					PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
					return 1;
				}
			}
			if(PlayerInfo[playerid][pAdmin] > 1)
			{
				giveplayerid = ReturnUser(temp);
				if(IsPlayerConnected(giveplayerid))
				{
				    if(giveplayerid != INVALID_PLAYER_ID)
				    {
				        Spectate[playerid] = giveplayerid;
						new Float:health;
						GetPlayerHealth(Spectate[playerid], health);
						GetPlayerName(Spectate[playerid], giveplayer, sizeof(giveplayer));
						new cash =  GetPlayerCash(Spectate[playerid]);
						if (PlayerInfo[playerid][pAdmin] >= 1)
						{
							format(string, sizeof(string), "Recon: (%d) %s $%d H:%.0f",Spectate[playerid],giveplayer,cash,health);
						}
						else
						{
							format(string, sizeof(string), "UAV: (%d) %s",Spectate[playerid],giveplayer);
						}
						SendClientMessage(playerid, COLOR_GREEN, string);
						WatchingTV[playerid] = 1;
					}
				}
				else
				{
					SendClientMessage(playerid, COLOR_GREEN, "Meta nije dostupna.");
				}
			}
		}
		return 1;
	}*/
	/*CMD:uncon(playerid, params[])
	{
	    if(IsPlayerConnected(playerid))
	    {
			SetCamBack(playerid);
		}
		return 1;
	}*/



Mikic95

Pogriješio si podforum, čitaj pravila.