Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:taxi(playerid, input[])
- {
- new tmp[30], id = -1;
- sscanf(input, "s[30]u", tmp, id);
- if(!strcmp(tmp, "duty", false))
- {
- SendClientMessage(playerid, color_grey, "You wrote 'duty'");
- return 1;
- }
- else if(!strcmp(tmp, "fare", false))
- {
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, color_orange, "Invalid playerid");
- new str[128];
- format(str, sizeof(str), "You added the taxi fare onto %s (id: %d)", SendName(id), id);
- SendClientMessage(playerid, color_grey, str);
- SendClientMessage(playerid, color_grey, "You wrote 'fare'");
- return 1;
- }
- else
- {
- SendClientMessage(playerid, color_orange, "Unknown taxi action");
- SendClientMessage(playerid, color_grey, "Available commands: /taxi [duty/fare]");
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement