jlalt

Commands

Feb 18th, 2016
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.91 KB | None | 0 0
  1. CMD:sgc1(playerid,params[]) {
  2.    if(PlayerInfo[playerid][SG] >= 1) {
  3.       new string[128];
  4.       if(PlayerInfo[playerid][blip] == 0) {
  5.         CMDMessageToSG(playerid,"SGC1");
  6.         PlayerInfo[playerid][pColour] = GetPlayerColor(playerid);
  7.         PlayerInfo[playerid][blip] = 1;
  8.         SetPlayerColor(playerid,0xC0C0C0AA);
  9.         format(string,sizeof(string),"You marker has been colored");
  10.       } else
  11.          {
  12.           KillTimer( BlipTimer[playerid] );
  13.           PlayerInfo[playerid][blip] = 0;
  14.           SetPlayerColor(playerid, PlayerInfo[playerid][pColour] );
  15.           format(string,sizeof(string),"You marker has been back to old color");
  16.       }
  17.       return SendClientMessage(playerid,blue,string);
  18.    } else return SendClientMessage(playerid,COLOR_BRIGHTRED,"ERROR: You need to be SG member rank 1 to use this command");
  19. }
  20. CMD:sgc2(playerid,params[]) {
  21.    if(PlayerInfo[playerid][SG] >= 1) {
  22.       new string[128];
  23.       if(PlayerInfo[playerid][blip] == 0) {
  24.         CMDMessageToSG(playerid,"SGC2");
  25.         PlayerInfo[playerid][pColour] = GetPlayerColor(playerid);
  26.         PlayerInfo[playerid][blip] = 1;
  27.         BlipTimer[playerid] = SetTimerEx("SGLight", 1000, 1, "i", playerid);
  28.         format(string,sizeof(string),"You marker has been highlighted");
  29.       } else
  30.          {
  31.           KillTimer( BlipTimer[playerid] );
  32.           PlayerInfo[playerid][blip] = 0;
  33.           SetPlayerColor(playerid, PlayerInfo[playerid][pColour] );
  34.           format(string,sizeof(string),"You marker has been stopped highlightinging");
  35.       }
  36.       return SendClientMessage(playerid,blue,string);
  37.    } else return SendClientMessage(playerid,COLOR_BRIGHTRED,"ERROR: You need to be SG member rank 1 to use this command");
  38. }
  39.  
  40. forward public SGLight(playerid);
  41. public SGLight(playerid) {
  42.     if(PlayerInfo[playerid][blipS] == 0) {
  43.       SetPlayerColor(playerid, 0x33FF33AA);
  44.       PlayerInfo[playerid][blipS] = 1;
  45.     }
  46.     else {
  47.       SetPlayerColor(playerid, 0xFF0000AA);
  48.       PlayerInfo[playerid][blipS] = 0;
  49.     }
  50.     return 1;
  51. }
Advertisement
Add Comment
Please, Sign In to add comment