Advertisement
dowster

Try this taxi code

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