Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #pragma tabsize 0
- new Float:PosX[MAX_PLAYERS], Float:PosY[MAX_PLAYERS], Float:PosZ[MAX_PLAYERS], Float:PosA[MAX_PLAYERS], PosI[MAX_PLAYERS]; //
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print("Simple AFK System by [AoA]RyDeR");
- print("--------------------------------------\n");
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerRequestSpawn(playerid)
- {
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- return 1;
- }
- public OnPlayerPrivmsg(playerid, recieverid, text[])
- {
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(strcmp(cmdtext, "/afk", true) == 0)
- {
- new string[256];
- GetPlayerPos(playerid, PosX[playerid], PosY[playerid], PosZ[playerid]);
- GetPlayerFacingAngle(playerid, PosA[playerid]);
- PosI[playerid] = (GetPlayerInterior(playerid));
- SetPlayerInterior(playerid,3);
- SetPlayerPos(playerid,198.3797,160.8905,1003.0300);
- SetPlayerFacingAngle(playerid,177.0350);
- SetCameraBehindPlayer(playerid);
- TogglePlayerControllable(playerid,0);
- new away[MAX_PLAYER_NAME];
- GetPlayerName(playerid, away, MAX_PLAYER_NAME);
- format(string, sizeof(string), "%s is AFK!", away);
- GameTextForAll(string, 4000, 6);
- return 1;
- }
- if(strcmp(cmdtext, "/back", true) == 0)
- {
- SetPlayerPos(playerid, PosX[playerid], PosY[playerid], PosZ[playerid]);
- SetPlayerFacingAngle(playerid, PosA[playerid]);
- SetCameraBehindPlayer(playerid);
- SetPlayerInterior(playerid, PosI[playerid]);
- new string[256];
- TogglePlayerControllable(playerid,1);
- new back[MAX_PLAYER_NAME];
- GetPlayerName(playerid, back, MAX_PLAYER_NAME);
- format(string, sizeof(string), "%s is BACK!", back);
- GameTextForAll(string, 4000, 6);
- return 1;
- }
- return 0;
- }
- public OnPlayerInfoChange(playerid)
- {
- return 1;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerEnterRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnRconCommand(cmd[])
- {
- return 1;
- }
- public OnObjectMoved(objectid)
- {
- return 1;
- }
- public OnPlayerObjectMoved(playerid, objectid)
- {
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- return 1;
- }
- public OnPlayerSelectedMenuRow(playerid, row)
- {
- return 1;
- }
- public OnPlayerExitedMenu(playerid)
- {
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment