One problem
#1

I used Seif /view cmd

And now the Pwanoc cant comp it its closed an crash.

Help me please, what to do?

Код:
	if(strcmp(cmd, "/view", true) == 0) // Spectates a player
	{
		if (AccountInfo[playerid][AdminLevel] < 2) return SendClientMessage(playerid,RED,"You're not an admin !");
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
	 		SendClientMessage(playerid, LIGHTBLUE, "View Help");
			SendClientMessage(playerid, WHITE, "USAGE: /view [playerid]");
			SendClientMessage(playerid, WHITE, "Will spectate a player.");
			SendClientMessage(playerid, WHITE, "/view off to stop spectating");
			SendClientMessage(playerid, LIGHTBLUE, "");
			return 1;
		}
		new targetid = ReturnUser(tmp);
		if (giveplayerid != INVALID_PLAYER_ID)
		{
		  if (AccountInfo[playerid][AdminLevel] < 2) return SendClientMessage(playerid,RED,"You're not an admin !");
		  TogglePlayerSpectating(playerid, 1);
		  SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(targetid));
		  SetPlayerInterior(playerid,GetPlayerInterior(targetid));
			if (IsPlayerInAnyVehicle(targetid)) PlayerSpectateVehicle(playerid, GetPlayerVehicleID(targetid));
			else PlayerSpectatePlayer(playerid, targetid);
			SendClientMessage(playerid, GREY, "Type /view off to stop spectating");
		}
		else if(strcmp(tmp, "off", true) == 0)
		{
		  TogglePlayerSpectating(playerid, 0);
	   	SetPlayerVirtualWorld(playerid,0);
		}
		else
		{
	    format(string, sizeof(string), "%d is not an active player.", giveplayerid);
			SendClientMessage(playerid, GREY, string);
		}
		return 1;
	}
Reply


Messages In This Thread
One problem - by Taz86 - 08.04.2009, 23:13
Re: One problem - by Taz86 - 08.04.2009, 23:43
Re: One problem - by miokie - 08.04.2009, 23:44
Re: One problem - by MenaceX^ - 08.04.2009, 23:47
Re: One problem - by Taz86 - 08.04.2009, 23:50
Re: One problem - by MenaceX^ - 08.04.2009, 23:57
Re: One problem - by Taz86 - 09.04.2009, 00:14
Re: One problem - by Taz86 - 10.04.2009, 10:48

Forum Jump:


Users browsing this thread: 1 Guest(s)