Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //At the top of your script, near your other global definitions -
- new Shown[MAX_PLAYERS] = -1;
- //OnPlayerCommandText -
- if (strcmp("/showme", cmdtext, true, 7) == 0)
- {
- if(Shown[playerid] == -1) {
- for(new i=0; i<MAX_PLAYERS; i++) {
- // Make the players marker red to all currently online players.
- SetPlayerMarkerForPlayer(i, playerid, 0xFF0000FF);
- }
- Shown[playerid] = 1;
- SetTimerEx("HideMarker", 60000*5, 1, "i", playerid);
- }
- else return 0; //Already shown!
- }
- return 0;
- }
- //Out of the OnPlayerCommandText callback -
- forward HideMarker(playerid);
- public HideMarker(playerid)
- {
- for(new i=0; i<MAX_PLAYERS; i++) {
- SetPlayerMarkerForPlayer(i, playerid, 0xFFFFFF00 );
- Shown[playerid] = -1;
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement