Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Sorry about the messy code, you can optimise it further if you wish!
- // - Lewwy
- #include <a_samp>
- new droptimer[MAX_PLAYERS],
- restarttimer[MAX_PLAYERS];
- public OnFilterScriptInit()
- {
- print("Pedestrian script by Lewwy");
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- SetPlayerInterior(playerid, 10);
- SetPlayerPos(playerid, 1961.6940, 1007.0735, 992.4688);
- TogglePlayerControllable(playerid, 0);
- droptimer[playerid] = SetTimerEx("PedDrop", 2500, 0, "i", playerid);
- if(GetPVarInt(playerid, "firsttime") == 0)
- {
- SetPVarInt(playerid, "firsttime", 1);
- SetTimerEx("PedStop", 20000, 0, "i", playerid);
- }
- return 1;
- }
- forward PedDrop(playerid);
- public PedDrop(playerid)
- {
- SetPlayerInterior(playerid, 0);
- restarttimer[playerid] = SetTimerEx("PedRestart", 2500, 0, "i", playerid);
- return 1;
- }
- forward PedRestart(playerid);
- public PedRestart(playerid)
- {
- return OnPlayerSpawn(playerid);
- }
- forward PedStop(playerid);
- public PedStop(playerid)
- {
- KillTimer(droptimer[playerid]);
- KillTimer(restarttimer[playerid]);
- SetPlayerInterior(playerid, 0);
- GivePlayerWeapon(playerid, 46, 1);
- GameTextForPlayer(playerid, "~r~Land on the Four Dragon's Casino Roof!", 2500, 5);
- TogglePlayerControllable(playerid, 1);
- SetPVarInt(playerid, "firsttime", 0);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement