Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <ZCMD>
- new Float:PlayerPosX1[MAX_PLAYERS], Float:PlayerPosY1[MAX_PLAYERS], Float:PlayerPosZ1[MAX_PLAYERS];
- new Float:PlayerPosX2[MAX_PLAYERS], Float:PlayerPosY2[MAX_PLAYERS], Float:PlayerPosZ2[MAX_PLAYERS];
- new Float:PlayerPosX3[MAX_PLAYERS], Float:PlayerPosY3[MAX_PLAYERS], Float:PlayerPosZ3[MAX_PLAYERS];
- CMD:poshelp(playerid, params[])
- {
- SendClientMessage(playerid, -1, "[Saved Positions] /savepos1 /savepos2 /savepos3");
- SendClientMessage(playerid, -1, "[Saved Positions] /gotopos1 /gotopos2 /gotopos3");
- return 1;
- }
- CMD:savepos1(playerid, params[])
- {
- GetPlayerPos(playerid, PlayerPosX1[playerid], PlayerPosY1[playerid], PlayerPosZ1[playerid]);
- SendClientMessage(playerid, -1, "You have saved your position. You can get back here by using /gotopos1");
- return 1;
- }
- CMD:gotopos1(playerid, params[])
- {
- SetPlayerPos(playerid, PlayerPosX1[playerid], PlayerPosY1[playerid], PlayerPosZ1[playerid]);
- SendClientMessage(playerid, -1, "You have successfully teleported to this position!");
- return 1;
- }
- CMD:savepos2(playerid, params[])
- {
- GetPlayerPos(playerid, PlayerPosX2[playerid], PlayerPosY2[playerid], PlayerPosZ2[playerid]);
- SendClientMessage(playerid, -1, "You have saved your position. You can get back here by using /gotopos2");
- return 1;
- }
- CMD:gotopos2(playerid, params[])
- {
- SetPlayerPos(playerid, PlayerPosX2[playerid], PlayerPosY2[playerid], PlayerPosZ2[playerid]);
- SendClientMessage(playerid, -1, "You have successfully teleported to this position!");
- return 1;
- }
- CMD:savepos3(playerid, params[])
- {
- GetPlayerPos(playerid, PlayerPosX3[playerid], PlayerPosY3[playerid], PlayerPosZ3[playerid]);
- SendClientMessage(playerid, -1, "You have saved your position. You can get back here by using /gotopos3");
- return 1;
- }
- CMD:gotopos3(playerid, params[])
- {
- SetPlayerPos(playerid, PlayerPosX3[playerid], PlayerPosY3[playerid], PlayerPosZ3[playerid]);
- SendClientMessage(playerid, -1, "You have successfully teleported to this position!");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement