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
#2

Help Glup....
Reply
#3

ask in the thread where you found that piece of code.
Reply
#4

It happens because of less/too much brackets.
Reply
#5

Where to ask it?
Reply
#6

I'll redo it to you in another way.. In my own coding style
If you want.
Reply
#7

Quote:
Originally Posted by MenaceX^
I'll redo it to you in another way.. In my own coding style
If you want.
Np, i just need a spec cmd that the admin will can stop spec.

Thanks alot!
Reply
#8

Quote:
Originally Posted by MenaceX^
I'll redo it to you in another way.. In my own coding style
If you want.
Can you do it and send me?
Im waiting
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)