Advertisement
Whitetigerswt

Untitled

Sep 18th, 2011
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.80 KB | None | 0 0
  1. CMD:taxi(playerid, input[])
  2. {
  3.     new tmp[30], id = -1;
  4.     sscanf(input, "s[30]u", tmp, id);
  5.  
  6.     if(!strcmp(tmp, "duty", false))
  7.     {
  8.         SendClientMessage(playerid, color_grey, "You wrote 'duty'");
  9.         return 1;
  10.     }
  11.     else if(!strcmp(tmp, "fare", false))
  12.     {
  13.         if(!IsPlayerConnected(id)) return SendClientMessage(playerid, color_orange, "Invalid playerid");
  14.        
  15.         new str[128];
  16.         format(str, sizeof(str), "You added the taxi fare onto %s (id: %d)", SendName(id), id);
  17.         SendClientMessage(playerid, color_grey, str);
  18.         SendClientMessage(playerid, color_grey, "You wrote 'fare'");
  19.         return 1;
  20.     }
  21.     else
  22.     {
  23.         SendClientMessage(playerid, color_orange, "Unknown taxi action");
  24.         SendClientMessage(playerid, color_grey, "Available commands: /taxi [duty/fare]");
  25.     }
  26.     return 1;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement