Advertisement
Guest User

Untitled

a guest
Jan 18th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.89 KB | None | 0 0
  1. CMD:checkplate(playerid, params[])
  2. {
  3.     static
  4.         rows,
  5.         fields;
  6.  
  7.     static
  8.         string[1024],
  9.         name[128],
  10.         id;
  11.  
  12.     cache_get_data(rows, fields, g_iHandle);
  13.  
  14.     if (!rows)
  15.         return SendErrorMessage(playerid, "Este veículo não existe.");
  16.  
  17.     if (GetFactionType(playerid) != FACTION_POLICE)
  18.         return SendErrorMessage(playerid, "You needs be a cop.");
  19.  
  20.     if (sscanf(params, "d", id))
  21.         return SendSyntaxMessage(playerid, "/checkplate [vehicleid]");
  22.  
  23.     if (!IsValidVehicle(id) || Car_GetID(id) == -1)
  24.         return SendErrorMessage(playerid, "You specified an invalid ID.");
  25.  
  26.     string[0] = 0;
  27.  
  28.     for (new i = 0; i < rows; i ++)
  29.     {
  30.         format(string,sizeof(string),"The owner of this car it's %s.", cache_get_field_content(i, "Character", CarData[id][carOwner], g_iHandle, MAX_PLAYER_NAME+1));
  31.         SendClientMessage(playerid, COLOR_GREEN, string);
  32.     }
  33.     return 1;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement