Vikshay

sadsds

Oct 12th, 2014
300
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.38 KB | None | 0 0
  1. #include <a_samp>
  2. #pragma tabsize 0
  3. #include <zcmd>
  4. #define COLOR_YELLOW 0xFFFF00
  5. #define grey 0x666666
  6. stock PlayerName(playerid)
  7.  
  8.  {
  9.      new name[MAX_PLAYER_NAME];
  10.      GetPlayerName(playerid, name, sizeof(name));
  11.      return name;
  12. }
  13.  
  14.  
  15. CMD:sfp(playerid, params[])
  16. {
  17. //  Streamer_UpdateEx(playerid,x,y,z); //to update the map so the chance of falling through is smaller
  18.     new vehicleid = GetPlayerVehicleID(playerid), State = GetPlayerState(playerid),string[86]; //variables used
  19.     format(string, sizeof(string), "%s teleported to San Fierro Pier (/SFP)", PlayerName(playerid)); //
  20.     SendClientMessage(playerid, COLOR_YELLOW, "Welcome to San Fierro Pier!"); //send a personal message
  21.     SendClientMessageToAll(grey, string); //tell all the players
  22.     SetPlayerInterior(playerid,0);
  23.     SetPlayerVirtualWorld(playerid, 0);
  24.     if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)//if in a car AND is the driver of the car
  25.     {
  26.         SetVehiclePos(vehicleid, -1423.1127,1087.9763,1.6713);
  27.         SetVehicleZAngle(vehicleid, 31.0658); //vehicles rotation/angle (the argument after the z coordinate in the savedpositions)
  28.         return 1; //if he was in a car, the code stops here
  29.     } //if on foot
  30.     SetPlayerPos(playerid,-1372.0990,1085.3533,1.3000); //position
  31.     SetPlayerFacingAngle(playerid, 343.4928); //players facing angle (the argument after the z coordinate in the savedpositions)
  32.     return 1;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment