SA-MP Forums Archive
Need help with making an admin spot.. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need help with making an admin spot.. (/showthread.php?tid=88752)



Need help with making an admin spot.. - Hiitch - 28.07.2009

Hello everyone, today I'm working on a new thing for a game mode, what I want it to do is, for the rcon admins, when they type /enter at a point, they are in a new place. this is what I got, but I get 4 errors, can anyone help?

forwarded

Код:
forward OnPlayerPickupPickup (playerid, pickupid);
The pickups VV

Код:
new adminenterpickup;
new adminexitpickup;
under OnGameModeInit();
Код:
	adminenterpickup = CreatePickup (1239, 1, 794.3425,-1811.2014,13.0234);
	adminexitpickup = CreatePickup(1239, 1, 1726.1801,-1641.0100,20.2245);
Rest of the code (the problem part)

Код:
public OnPlayerPickupPickup(playerid, pickupid)
{
	if (pickupid == adminenterpickup) && IsPlayerAdmin(playerid); && strcmp(cmd, "/enter", true) == 0);
	{
		SendClientMessage(playerid, 0xFF0000FF, "Welcome to the admin spot rcon admin!");
		SetPlayerPos(1726.1801,-1641.0100,20.2245);
		return 1;
	}
	else if (pickupid == adminexitpickup) && IsPlayerAdmin(playerid); && strcmp(cmd, "/exit", true) == 0);
	{
	  SendClientMessage(playerid, 0xFF0000FF, "You leave the admin spot and respawn outside near the beach");
	  SetPlayerPos(794.3425,-1811.2014,13.0234);
	  return 1;
	}
	else if !IsPlayerAdmin(playerid);
	{
		return 0;
	}
	return 1;
}
When I compile, I get these messages VV

Код:
C:\Documents and Settings\Administrator\Desktop\samp02Xserver.win32\gamemodes\sftdm.pwn(653) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\Desktop\samp02Xserver.win32\gamemodes\sftdm.pwn(653) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\Desktop\samp02Xserver.win32\gamemodes\sftdm.pwn(653) : error 017: undefined symbol "cmd"
C:\Documents and Settings\Administrator\Desktop\samp02Xserver.win32\gamemodes\sftdm.pwn(653) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
-- Line 653
Код:
	if (pickupid == adminenterpickup) && IsPlayerAdmin(playerid); && strcmp(cmd, "/enter", true) == 0);
please help if you can !