Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Copyright © 2010 RealCop228 (Nick Piccoli)
- // You are free to edit this script all you
- // need, but you are NOT free to release this
- // script without my permission, RealCop228.
- #define FILTERSCRIPT
- #include <a_samp>
- #include <zcmd>
- #define COLOR_RED 0xE60000FF
- #define COLOR_WHITE 0xFFFFFFAA
- public OnFilterScriptInit()
- {
- print(" R-Positions by RealCop228 has been successfully loaded. ");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- return 1;
- }
- command(savepos, playerid, params[])
- {
- new string[128], Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
- if(!IsPlayerAdmin(playerid))
- return SendClientMessage(playerid, COLOR_RED, "You are not an RCON administrator!");
- GetPlayerPos(playerid, PosX, PosY, PosZ);
- GetPlayerFacingAngle(playerid, Angle);
- SetPVarFloat(playerid, "PositionX", PosX);
- SetPVarFloat(playerid, "PositionY", PosY);
- SetPVarFloat(playerid, "PositionZ", PosZ);
- SetPVarFloat(playerid, "PositionA", Angle);
- format(string, sizeof(string), "You have saved your position to %f, %f, %f, %f.", PosX, PosY, PosZ, Angle);
- SendClientMessage(playerid, COLOR_WHITE, string);
- return 1;
- }
- command(gotopos, playerid, params[])
- {
- new string[128], Float:PosX, Float:PosY, Float:PosZ, Float:PosA;
- if(!IsPlayerAdmin(playerid))
- return SendClientMessage(playerid, COLOR_RED, "You are not an RCON administrator!");
- PosX = GetPVarFloat(playerid, "PositionX");
- PosY = GetPVarFloat(playerid, "PositionY");
- PosZ = GetPVarFloat(playerid, "PositionZ");
- PosA = GetPVarFloat(playerid, "PositionA");
- SetPlayerPos(playerid, PosX, PosY, PosZ);
- SetPlayerFacingAngle(playerid, PosA);
- format(string, sizeof(string), "You have been warped to your position at %f, %f, %f, %f.", PosX, PosY, PosZ, PosA);
- SendClientMessage(playerid, COLOR_WHITE, string);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement