Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <foreach>
- #undef MAX_PLAYERS
- #define MAX_PLAYERS 40
- forward OnPlayerLoad(playerid);
- new isPlayerLoaded[MAX_PLAYERS];
- main()
- {
- }
- public OnPlayerConnect(playerid)
- {
- isPlayerLoaded[playerid] = 0;
- TogglePlayerSpectating(playerid, 1);
- SetTimerEx("OnPlayerLoad", 5000, 0, "i", playerid);
- GameTextForPlayer(playerid, "~w~Loading~n~Please wait", 10000, 3);
- return 1;
- }
- public OnPlayerLoad(playerid)
- {
- if(!IsPlayerConnected(playerid)) return 0;
- isPlayerLoaded[playerid] = 1;
- TogglePlayerSpectating(playerid, 0);
- GameTextForPlayer(playerid, "~n~", 100, 3);
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- foreach(new i : Player)
- {
- if(isPlayerLoaded[i]) SendPlayerMessageToPlayer(i, playerid, text);
- }
- return 0;
- }
- public OnGameModeInit()
- {
- SetGameModeText("Main Script");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment