I cannot get my /spec working..
#8

Quote:
Originally Posted by kman
/spec doesnt work on lvrcr gm and it probably doesnt work on westcoast roleplay either
Wrong.


Here is one that works perfect for lvrcr gm - but does work for anyone.


Add this under OnPlayerCommandText

Code:
if(strcmp(cmd,"/spec",true)==0)
  tmp = strtok(cmdtext, idx);
  if(!strlen(tmp)) {
  SendClientMessage(playerid, COLOR_ERROR, "USAGE: /spec (id)");
  return 1;
  }
  if(!IsNumeric(tmp)) {
  SendClientMessage(playerid, COLOR_ERROR, "USAGE: /spec (id) ID Must be a number");
  return 1;
  }
  if(strval(tmp) == playerid) {
  SendClientMessage(playerid, COLOR_ERROR, "You cannot spec yourself!");
  return 1;
  }
  giveplayerid = strval(tmp);
  if(!IsPlayerConnected(giveplayerid)) {
  format(string, sizeof(string), "ID (%d) Is not an active player",giveplayerid);
  SendClientMessage(playerid, COLOR_ERROR, string);
  return 1;
  }
	TogglePlayerSpectating(playerid, 1);
  SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(giveplayerid));
  SetPlayerInterior(playerid,GetPlayerInterior(giveplayerid));
	if (IsPlayerInAnyVehicle(giveplayerid)) PlayerSpectateVehicle(playerid, GetPlayerVehicleID(giveplayerid));
	else PlayerSpectatePlayer(playerid, giveplayerid);
	return 1;
	}
Reply


Messages In This Thread
I cannot get my /spec working.. - by Lia - 11.09.2009, 00:09
Re: I cannot get my /spec working.. - by Jason_Borne420 - 11.09.2009, 00:28
Re: I cannot get my /spec working.. - by Lia - 11.09.2009, 00:36
Re: I cannot get my /spec working.. - by Anwix - 11.09.2009, 00:51
Re: I cannot get my /spec working.. - by Jason_Borne420 - 19.10.2009, 02:41
Re: I cannot get my /spec working.. - by Lia - 20.10.2009, 21:24
Re: I cannot get my /spec working.. - by kman - 20.10.2009, 21:35
Re: I cannot get my /spec working.. - by Jason_Borne420 - 22.10.2009, 01:50
Re: I cannot get my /spec working.. - by Lia - 22.10.2009, 02:12
Re: I cannot get my /spec working.. - by Jason_Borne420 - 22.10.2009, 03:40

Forum Jump:


Users browsing this thread: 1 Guest(s)