Friday, November 12, 2010

SAMP Scripting: Save positions & Create a Player Selection Script

Here is the code

// The models (skins) from which the player can choose
// Add this inside of OnGameModeInit()
AddPlayerClass(0,1544.7887,-1675.4630,13.5591,88.8707,38,999,0,0,0,0);
AddPlayerClass(165,1544.7887,-1675.4630,13.5591,88.8707,38,999,0,0,0,0);
AddPlayerClass(166,1544.7887,-1675.4630,13.5591,88.8707,38,999,0,0,0,0);
AddPlayerClass(280,1544.7887,-1675.4630,13.5591,88.8707,38,999,0,0,0,0);
AddPlayerClass(282,1544.7887,-1675.4630,13.5591,88.8707,38,999,0,0,0,0);
AddPlayerClass(286,1544.7887,-1675.4630,13.5591,88.8707,38,999,0,0,0,0);
AddPlayerClass(287,1544.7887,-1675.4630,13.5591,88.8707,38,999,0,0,0,0);
AddPlayerClass(163,1544.7887,-1675.4630,13.5591,88.8707,38,999,0,0,0,0);
AddPlayerClass(164,1544.7887,-1675.4630,13.5591,88.8707,38,999,0,0,0,0);
AddPlayerClass(283,1544.7887,-1675.4630,13.5591,88.8707,38,999,0,0,0,0);

AddStaticVehicle(463,1538.0513,-1694.6932,13.0872,181.3842,11,11);
/------------------------------------------------------------------------/

// OnPlayerRequestClass(playerid, classid)
SetPlayerPos(playerid, 1544.7887,-1675.4630,13.5591);
SetPlayerFacingAngle(playerid,90.0);
SetPlayerCameraPos(playerid, 1541.5293,-1675.4012,13.5527);
SetPlayerCameraLookAt(playerid, 1544.7887,-1675.4630,13.5591);
/------------------------------------------------------------------------/

// OnPlayerConnect(playerid)
GameTextForPlayer(playerid,"~r~Hello!",10000,6);

3 comments: