Admin Spawn? - 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: Admin Spawn? (
/showthread.php?tid=94430)
Admin Spawn? -
Feyenoorder - 29.08.2009
Ey guys
How do I make some Admin spawnplaces?
Greets Geert
Re: Admin Spawn? -
[LSB]Clinz - 29.08.2009
Under OnPlayerSpawn;
Код:
if(IsPlayerAdmin(playerid))
{
SetPlayerPos(playerid,X,Y,Z);
}
return 1;
}
Replace the X,Y,Z though.
Re: Admin Spawn? -
mirkoiz - 29.08.2009
Quote:
Originally Posted by [LSB
Clinz ]
Under OnPlayerSpawn;
Код:
if(IsPlayerAdmin(playerid);
Replace the X,Y,Z though.
|
I have to correct you

This would give errors
pawn Код:
if(IsPlayerAdmin(playerid))
{
//======== RCON Administrator Spawn
SetPlayerPos(playerid,X,Y,Z);
}
else
{
//======== Normal Spawn
SetPlayerPos(playerid,X,Y,Z);
}
Put this under
OnplayerSpawn
Replace the X, Y and Z with the coordinate
Re: Admin Spawn? -
Correlli - 29.08.2009
Quote:
Originally Posted by ►☺◄©ookie►☺◄
pawn Код:
if(IsPlayerAdmin(playerid) { SetPlayerPos(playerid,X,Y,Z); } return 1; }
|
Yours too, you forgot ) at if statement.
pawn Код:
if(IsPlayerAdmin(playerid))
{
SetPlayerPos(playerid, X, Y, Z);
}
Re: Admin Spawn? -
mirkoiz - 29.08.2009
Don Corelli, post updated
Re: Admin Spawn? -
Feyenoorder - 29.08.2009
mkay thanx! and how to make more spawns with that little script? it have to be random
i'm reading books about scripting and i'm learning it but im still a beginner soz
Re: Admin Spawn? -
Feyenoorder - 29.08.2009
sorry for double post but it says'
gamemode.pwn(41) : error 017: undefined symbol "playerid"
gamemode.pwn(43) : error 017: undefined symbol "playerid"
what to do
Re: Admin Spawn? -
[LSB]Clinz - 29.08.2009
Sorry, I just looked back at my code and I realised it was totally wrong and I didn't take my time posting, sorry.
Re: Admin Spawn? -
(.Aztec); - 30.08.2009
pawn Код:
if(IsPlayerAdmin(playerid))
{
SetPlayerPos(playerid, x, y, z);
SetPlayerInterior(playerid, 0); //Change this, i put it outside.
}
else
{
SetPlayerPos(playerid, x, y, z);
SetPlayerInterior(playerid, 0); //Change this.
}
Quote:
Originally Posted by Feyenoorder
sorry for double post but it says'
gamemode.pwn(41) : error 017: undefined symbol "playerid"
gamemode.pwn(43) : error 017: undefined symbol "playerid"
what to do 
|
Are you sure you're putting it under OnPlayerSpawn?
EDIT: If somehow you are compiling without the correct public for OnPlayerSpawn, here it is:
pawn Код:
public OnPlayerSpawn(playerid)
{
return 1;
}
Here, just copy-paste this and use it:
pawn Код:
public OnPlayerSpawn(playerid)
{
if(IsPlayerAdmin(playerid)) //Change this to your servers admin system.
{
SetPlayerPos(playerid, x, y, z);
SetPlayerInterior(playerid, 0); //Change this, i put it outside.
}
else
{
SetPlayerPos(playerid, x, y, z);
SetPlayerInterior(playerid, 0); //Change this.
}
return 1;
}
Note: you must be logged into RCON to use this.