A little information about that thing:

pawn Код:
SetPlayerPos(playerid, X,Y,Z); //Where player will be standing
SetPlayerCameraPos(playerid, X,Y,Z); //Where camera will be
SetPlayerFacingAngle(playerid, angle); //Where player will be facing
SetPlayerCameraLookAt(playerid, X,Y,Z); //Put same coords that you used in SetPlayerPos.
Hope this helped.

Use /save to save positions to savedpositions.txt in ../Documents/GTA San Andreas User Files/SAMP/
It's useful. I maked another command to save positions in the server_log.txt. If you dont like /save, add this to your script

OnPlayerCommandText(playerid, cmdtext[])
//[...] //You need the strtok to add this
      if(strcmp(cmd, "/getpos", true) == 0)
	  if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "Debug Command!");
  	  new Float:x, Float:y, Float:z, Float:Zangle, Float:angle;
	  new vehicleid = GetPlayerVehicleID(playerid);
	  GetVehicleZAngle(vehicleid, Zangle);
	  SendClientMessage(playerid,COLOR_YELLOW,"Position Saved.");
	  print("    ");
	  if(!IsPlayerInAnyVehicle(playerid)) printf("%f,%f,%f,%f",x,y,z,angle);
	  if(IsPlayerInAnyVehicle(playerid)) printf("CreateVehicle(MOD,%f,%f,%f,%f,CO1,CO2,1000000);",x,y,z,Zangle);
	  printf("Interior: %d",GetPlayerInterior(playerid));
	  print("    ");
	  return 1;
You can also add a comment that will be shown under the ______________________s
Here is how it looks when you save it in the server_log:

[17:04:34] __________________________________________________
[17:04:34] ________________SAVED_POSITION_________________
[17:04:34] 2402.397949,-1720.991088,13.612230,179.039367
[17:04:34] Interior: 0
[17:04:40] [chat] [Pinki11]: spawn point of denise
[17:04:45] __________________________________________________
[17:04:45] ________________SAVED_POSITION_________________
[17:04:45] 2402.473144,-1716.154541,13.860107,357.786102
[17:04:45] Interior: 0
[17:04:56] [chat] [Pinki11]: pos of the pickup
With this command you can read the comments of the pos. Do /getpos on the selected position that you want to spawn the player.

Notice: You have to be a rcon admin.


AddPlayerClass(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
To add more weapons use GivePlayerWeapons(playerid, weaponid, ammo); in OnPlayerSpawn.


modelid = The skin model
spawn_x = The X Array of the saved pos with my /getpos (look my first post in this topic)
spawn_y = The Y Array of the saved pos with my /getpos (look my first post in this topic)
spawn_z = The Z Array of the saved pos with my /getpos (look my first post in this topic)
z_angle = The facing angle. 0 = player looking at north. 180 = player looking at south. 90 and 270 are east and west. I dont know what's east and whats west.
weapon 1 - 2 - 3 = The 3 main weapons
weapon_1 - 2 - 3_ammo = the ammo of the three weapons.

Use my /getpos function to get pos more easly than /save (by sa-mp).

If you need help for scripting Kingunit PM me.

PS: This is my 50° post!! I am a big clucker now!

Forum Jump:

Users browsing this thread: 1 Guest(s)