[Help]I need a special teleport(SOLVED) Subject Close
#1

So.....i want the player with name
Code:
xXEdyXx
when he spawn, i want to go to
Code:
1574.1846,2839.3669,10.8203
coordonates.

Sorry for my bad english i am Romanian
Reply
#2

Code:
public OnPlayerSpawn(playerid)
{
     if(strcmp(name, "xXEdyXx") == 0)
	{
		SetPlayerPos(playerid,1574.1846,2839.3669,10.8203);
	}
     return 1;
}
here is it .
________
FREE VAPORIZER
Reply
#3

Tnx man
Reply
#4

urw
________
Buddhism forum
Reply
#5

2 Errors
Code:
D:\Edy\GTA San Andreas\Servere\Fun Server\gamemodes\remat_fun.pwn(711) : error 017: undefined symbol "name"
D:\Edy\GTA San Andreas\Servere\Fun Server\gamemodes\remat_fun.pwn(713) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#6

Quote:
Originally Posted by edycool
2 Errors
Code:
D:\Edy\GTA San Andreas\Servere\Fun Server\gamemodes\remat_fun.pwn(711) : error 017: undefined symbol "name"
D:\Edy\GTA San Andreas\Servere\Fun Server\gamemodes\remat_fun.pwn(713) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
pawn Code:
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, 40);
Reply
#7

Other 2 errors
Code:
D:\Edy\GTA San Andreas\Servere\Fun Server\gamemodes\remat_fun.pwn(59) : error 021: symbol already defined: "GetPlayerName"
D:\Edy\GTA San Andreas\Servere\Fun Server\gamemodes\remat_fun.pwn(715) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#8

The player is teleport to location 5 to 5 seconds
My Code
On Top
Code:
new name[MAX_PLAYER_NAME];
Code:
public OnPlayerSpawn(playerid)
{
new playerid;
if(strcmp(name, "xXEdyXx") == 0)
{
SetPlayerPos(playerid,1574.1846,2839.3669,10.8203);
}
return 1;
}
Reply
#9

sorry , try this :
Code:
     new name[MAX_PLAYER_NAME];
	GetPlayerName(playerid, name, MAX_PLAYER_NAME);
	
     if(strcmp(name, "xXEdyXx") == 0)
	{
		SetPlayerPos(playerid,1574.1846,2839.3669,10.8203);
	}
________
Coach handbags
Reply
#10

Quote:
Originally Posted by [AC
Etch ]
sorry , try this :
Code:
     new name[MAX_PLAYER_NAME];
	GetPlayerName(playerid, name, MAX_PLAYER_NAME);
	
     if(strcmp(name, "xXEdyXx") == 0)
	{
		SetPlayerPos(playerid,1574.1846,2839.3669,10.8203);
	}
The player is teleport to location 5 to 5 seconds
My Code
On Top
Code:
new name[MAX_PLAYER_NAME];
On OnPlayerSpawn(playerid)
Code:
public OnPlayerSpawn(playerid)
{
new playerid;
if(strcmp(name, "xXEdyXx") == 0)
{
SetPlayerPos(playerid,1574.1846,2839.3669,10.8203);
}
return 1;
}
Reply
#11

i dont understand this : "The player is teleport to location 5 to 5 seconds" and did the code work??
________
Ship Sale
Reply
#12

Quote:
Originally Posted by ~ ????????? ~
pawn Code:
public OnPlayerSpawn(playerid)
{
    new name[24];
    GetPlayerName(playerid, name, 24);
    if(strcmp(name, "xXEdyXx") == 0)
    {
        SetPlayerPos(playerid,1574.1846,2839.3669,10.8203);
    }
    return 1;
}

the code i posted worked with him :



Quote:
Originally Posted by edycool
Quote:
Originally Posted by [AC
Etch ]
sorry , try this :
Code:
     new name[MAX_PLAYER_NAME];
	GetPlayerName(playerid, name, MAX_PLAYER_NAME);
	
     if(strcmp(name, "xXEdyXx") == 0)
	{
		SetPlayerPos(playerid,1574.1846,2839.3669,10.8203);
	}
The player is teleport to location 5 to 5 seconds
My Code
On Top
Code:
new name[MAX_PLAYER_NAME];
On OnPlayerSpawn(playerid)
Code:
public OnPlayerSpawn(playerid)
{
new playerid;
if(strcmp(name, "xXEdyXx") == 0)
{
SetPlayerPos(playerid,1574.1846,2839.3669,10.8203);
}
return 1;
}
Simple, I don't know why some people have posted a code like this without the GetPlayerName thing assigning the variable 'name' to the playerids name

Hope it works
________
Video Review
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)