Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- ===========================================================================
- | Filterscript de Svya, mappeur de GTRP. ||
- ===========================================================================
- ______ __ ____ __ ______
- /\ ___\/\ \ / /\ \_\ \/\ __ \
- \ \___ \ \ \'/\ \____ \ \ __ \
- \/\_____\ \__| \/\_____\ \_\ \_\
- \/_____/\/_/ \/_____/\/_/\/_/
- */
- #include <a_samp>
- #include <izcmd>
- #include <sscanf2>
- #include <streamer>
- #include <a_GTFonction>
- #define DIALOG_SVYA 20000
- #define SQLID_SVYA 126784
- #define CMD_INTERDIT Erreur(playerid, "Vous n'êtes pas autorisé à utiliser cette commande.");
- public OnFilterScriptInit()
- {
- CreateSvyaMapping();
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- CMD:svya(playerid, params[])
- {
- if(GetPVarInt(playerid, "SQLID") != SQLID_SVYA)
- return CMD_INTERDIT
- ShowPlayerDialog(playerid, DIALOG_SVYA, DIALOG_STYLE_MSGBOX, "Tes commandes sal batard","Commandes de Svya le PD:\n» /gotoco /baffe /unfreeze\n» /haut /bas /droite /gauche", "Ok", "");
- return 1;
- }
- CMD:gotoco(playerid, params[])
- {
- if(GetPVarInt(playerid, "SQLID") != SQLID_SVYA)
- return CMD_INTERDIT
- new Float:x,
- Float:y,
- Float:z,
- interior,
- vw;
- if(!sscanf(params, "p<,>fffI(0)I(0)", x, y, z, interior, vw))
- SetPlayerPosEx(playerid, x, y, z, 0.0, interior, vw);
- else if(!sscanf(params, "fffI(0)I(0)", x, y, z, interior, vw))
- SetPlayerPosEx(playerid, x, y, z, 0.0, interior, vw);
- else
- return Usage(playerid, "/gotocoo [x] [y] [z] [interieur]");
- InfoEx(playerid, INFO_OOC, _, "Vous avez été téléporté à la position: x:%.2f | y:%.2f | z:%.2f | Intérieur: %i | Monde: %i", x, y, z, interior, vw);
- return 1;
- }
- CMD:baffe(playerid, params[])
- {
- if(GetPVarInt(playerid, "SQLID") != SQLID_SVYA)
- return CMD_INTERDIT
- new Float:x,
- Float:y,
- Float:z;
- GetPlayerPos(playerid,x, y, z);
- SetPlayerPos(playerid, x, y, z+3.00);
- TogglePlayerControllable(playerid, 0);
- return 1;
- }
- CMD:unfreeze(playerid, params[])
- {
- if(GetPVarInt(playerid, "SQLID") != SQLID_SVYA)
- return CMD_INTERDIT
- TogglePlayerControllable(playerid, 1);
- return 1;
- }
- CMD:haut(playerid, params[])
- {
- if(GetPVarInt(playerid, "SQLID") != SQLID_SVYA)
- return CMD_INTERDIT
- new Float:x,
- Float:y,
- Float:z;
- GetPlayerPos(playerid,x, y, z);
- SetPlayerPos(playerid, x, y, z+2.00);
- return 1;
- }
- CMD:bas(playerid, params[])
- {
- if(GetPVarInt(playerid, "SQLID") != SQLID_SVYA)
- return CMD_INTERDIT
- new Float:x,
- Float:y,
- Float:z;
- GetPlayerPos(playerid,x, y, z);
- SetPlayerPos(playerid, x, y, z-2.00);
- return 1;
- }
- CMD:droite(playerid, params[])
- {
- if(GetPVarInt(playerid, "SQLID") != SQLID_SVYA)
- return CMD_INTERDIT
- new Float:x,
- Float:y,
- Float:z;
- GetPlayerPos(playerid,x, y, z);
- SetPlayerPos(playerid, x+2.00, y, z);
- return 1;
- }
- CMD:gauche(playerid, params[])
- {
- if(GetPVarInt(playerid, "SQLID") != SQLID_SVYA)
- return CMD_INTERDIT
- new Float:x,
- Float:y,
- Float:z;
- GetPlayerPos(playerid,x, y, z);
- SetPlayerPos(playerid, x-2.00, y, z);
- return 1;
- }
- CreateSvyaMapping()
- {
- return 1;
- }
- stock SetPlayerPosEx(playerid,Float:x,Float:y,Float:z,Float:angle = 0.0,interior = 0,vw = 0)
- {
- new Float: px, Float: py, Float: pz;
- new oldInt = GetPlayerInterior(playerid);
- GetPlayerPos(playerid, px, py, pz);
- if(interior != oldInt)
- SetPlayerInterior(playerid, interior);
- if(GetPlayerVirtualWorld(playerid) != vw)
- SetPlayerVirtualWorld(playerid, vw);
- SetPlayerPos(playerid,x,y,z);
- SetPlayerFacingAngle(playerid, angle);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement