Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #pragma tabsize 0
- #include <zcmd>
- #define COLOR_YELLOW 0xFFFF00
- #define grey 0x666666
- stock PlayerName(playerid)
- {
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- return name;
- }
- CMD:sfp(playerid, params[])
- {
- // Streamer_UpdateEx(playerid,x,y,z); //to update the map so the chance of falling through is smaller
- new vehicleid = GetPlayerVehicleID(playerid), State = GetPlayerState(playerid),string[86]; //variables used
- format(string, sizeof(string), "%s teleported to San Fierro Pier (/SFP)", PlayerName(playerid)); //
- SendClientMessage(playerid, COLOR_YELLOW, "Welcome to San Fierro Pier!"); //send a personal message
- SendClientMessageToAll(grey, string); //tell all the players
- SetPlayerInterior(playerid,0);
- SetPlayerVirtualWorld(playerid, 0);
- if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)//if in a car AND is the driver of the car
- {
- SetVehiclePos(vehicleid, -1423.1127,1087.9763,1.6713);
- SetVehicleZAngle(vehicleid, 31.0658); //vehicles rotation/angle (the argument after the z coordinate in the savedpositions)
- return 1; //if he was in a car, the code stops here
- } //if on foot
- SetPlayerPos(playerid,-1372.0990,1085.3533,1.3000); //position
- SetPlayerFacingAngle(playerid, 343.4928); //players facing angle (the argument after the z coordinate in the savedpositions)
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment