Guest User

SALRP

a guest
Nov 22nd, 2011
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.07 KB | None | 0 0
  1. CMD:pullover(playerid, params[]) {
  2.     if(playerVariables[playerid][pStatus] >= 1) {
  3.         if(groupVariables[playerVariables[playerid][pGroup]][gGroupType] == 1) {
  4.             if(isnull(params)) return SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/pullover");
  5.             else if (!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You're not in a vehicle.");
  6.  
  7.             new
  8.  
  9.                 queryString[255],
  10.                 textString[128];
  11.  
  12.             GetPlayerName(playerid, szPlayerName, MAX_PLAYER_NAME);
  13.             format(textString, sizeof(textString), "(megaphone) %s says: This is the LSPD, please pull over. Turn off your engine and remain seated.", szPlayerName, params);
  14.             nearByMessage(playerid, COLOR_HOTORANGE, textString, 50.0);
  15.  
  16.  
  17.             mysql_real_escape_string(textString, textString);
  18.  
  19.             format(queryString, sizeof(queryString), "INSERT INTO chatlogs (value, playerinternalid) VALUES('%s', '%d')", textString, playerVariables[playerid][pInternalID]);
  20.             mysql_query(queryString);
  21.         }
  22.         else SendClientMessage(playerid, COLOR_GREY, "You're not a law enforcement officer.");
  23.     }
  24.     return 1;
  25. }
  26.  
Advertisement
Add Comment
Please, Sign In to add comment