- Joined
- Jun 17, 2007
- Messages
- 116
- Reaction score
- 1
Yeah,, I know this isn't really hard, but it's for you noobs out there trying to get into SA:MP 
OK,, First off I'll just explain the variables in the SetPlayerPos() function
also remember to put this code INSIDE the OnPlayerCommandText() tag!
but that you might already know
PS: This is my first tut so it might not be that good :$:

OK,, First off I'll just explain the variables in the SetPlayerPos() function
Code:
SetPlayerPos(playerid,Float:x,Float:y,Float:z)
playerid = ID of the Player
Float:X = x coord
Float:y = y coord
Float:z = z coord
PHP:
// Teleports a player with his car or alone to the center
// of the map if he uses the command center
if strcmp(text,"/center",true) { // /center is what the player enter into the text field
if (IsPlayerInAnyVehicle(playerid)) { //Checks if player is inside a vehicle
SetVehiclePos(GetPlayerVehicleID(playerid),0.0,0.0,200.0); // Teleports the vehicle
} else {
SetPlayerPos(playerid,0.0,0.0,200.0); // teleports the player
}
}
also remember to put this code INSIDE the OnPlayerCommandText() tag!
but that you might already know

PS: This is my first tut so it might not be that good :$: