Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #if defined FILETSCRIPT
- #define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
- forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
- public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
- {
- if(IsPlayerConnected(playerid))
- {
- new Float:oldposx, Float:oldposy, Float:oldposz;
- new Float:tempposx, Float:tempposy, Float:tempposz;
- GetPlayerPos(playerid, oldposx, oldposy, oldposz);
- tempposx = (oldposx -x);
- tempposy = (oldposy -y);
- tempposz = (oldposz -z);
- if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
- {
- return true;
- }
- }
- return false;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- new String[256];
- dcmd(relogio,7,cmdtext);
- format(String, sizeof(String), "[Erro] o comando {FF0000} %s {0368E4} é Inválido!",cmdtext);
- return SendClientMessage(playerid, 0xFF00FFFF, String);
- }
- dcmd_relogio(playerid, params[])
- {
- new listitems[] = "Relogio 1\nRelogio 2\nRelogio 3\nRelogio 4\nRelogio 5\nRelogio 6\nRelogio 7\nRelogio 8\nRelogio 9\nRelogio 10\nRelogio 11\nRelogio 12\nRelogio 13\nRelogio 14\nRelogio 15";
- if(PlayerToPoint(15.0,playerid,209.3934,-100.8104,1005.2578))
- {
- ShowPlayerDialog(playerid, 10103, DIALOG_STYLE_LIST,"Lojas BINCO, relogios",listitems,"Comprar", "Cancelar");
- return true;
- }
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == 10103)
- {
- if(!response) return SendClientMessage(playerid, COLOR_GRAD1,"Lojas BINCO: Compra cancelada.");
- if(response)
- {
- if(listitem == 0)
- {
- if(GetPlayerMoney(playerid) > 10)
- {
- GivePlayerMoney(playerid, -10);
- SetPlayerAttachedObject( playerid, 0, 19039, 5, 0.000000, -0.007722, -0.011143, 9.279358, 270.517852, 190.637268, 1.000000, 1.000000, 1.000000 );
- return true;
- }
- }
- if(listitem == 1)
- {
- if(GetPlayerMoney(playerid) > 10)
- {
- GivePlayerMoney(playerid, -10);
- SetPlayerAttachedObject( playerid, 0, 19040, 5, 0.000000, -0.007722, -0.011143, 9.279358, 270.517852, 190.637268, 1.000000, 1.000000, 1.000000 );
- return true;
- }
- }
- if(listitem == 2)
- {
- if(GetPlayerMoney(playerid) > 10)
- {
- GivePlayerMoney(playerid, -10);
- SetPlayerAttachedObject( playerid, 0, 19041, 5, 0.000000, -0.007722, -0.011143, 9.279358, 270.517852, 190.637268, 1.000000, 1.000000, 1.000000 );
- return true;
- }
- }
- if(listitem == 3)
- {
- if(GetPlayerMoney(playerid) > 10)
- {
- GivePlayerMoney(playerid, -10);
- SetPlayerAttachedObject( playerid, 0, 19042, 5, 0.000000, -0.007722, -0.011143, 9.279358, 270.517852, 190.637268, 1.000000, 1.000000, 1.000000 );
- return true;
- }
- }
- if(listitem == 4)
- {
- if(GetPlayerMoney(playerid) > 10)
- {
- GivePlayerMoney(playerid, -10);
- SetPlayerAttachedObject( playerid, 0, 19043, 5, 0.000000, -0.007722, -0.011143, 9.279358, 270.517852, 190.637268, 1.000000, 1.000000, 1.000000 );
- return true;
- }
- }
- if(listitem == 5)
- {
- if(GetPlayerMoney(playerid) > 10)
- {
- GivePlayerMoney(playerid, -10);
- SetPlayerAttachedObject( playerid, 0, 19044, 5, 0.000000, -0.007722, -0.011143, 9.279358, 270.517852, 190.637268, 1.000000, 1.000000, 1.000000 );
- return true;
- }
- }
- if(listitem == 6)
- {
- if(GetPlayerMoney(playerid) > 10)
- {
- GivePlayerMoney(playerid, -10);
- SetPlayerAttachedObject( playerid, 0, 19045, 5, 0.000000, -0.007722, -0.011143, 9.279358, 270.517852, 190.637268, 1.000000, 1.000000, 1.000000 );
- return true;
- }
- }
- if(listitem == 7)
- {
- if(GetPlayerMoney(playerid) > 10)
- {
- GivePlayerMoney(playerid, -10);
- SetPlayerAttachedObject( playerid, 0, 19046, 5, 0.000000, -0.007722, -0.011143, 9.279358, 270.517852, 190.637268, 1.000000, 1.000000, 1.000000 );
- return true;
- }
- }
- if(listitem == 8)
- {
- if(GetPlayerMoney(playerid) > 10)
- {
- GivePlayerMoney(playerid, -10);
- SetPlayerAttachedObject( playerid, 0, 19047, 5, 0.000000, -0.007722, -0.011143, 9.279358, 270.517852, 190.637268, 1.000000, 1.000000, 1.000000 );
- return true;
- }
- }
- if(listitem == 9)
- {
- if(GetPlayerMoney(playerid) > 10)
- {
- GivePlayerMoney(playerid, -10);
- SetPlayerAttachedObject( playerid, 0, 19048, 5, 0.000000, -0.007722, -0.011143, 9.279358, 270.517852, 190.637268, 1.000000, 1.000000, 1.000000 );
- return true;
- }
- }
- if(listitem == 10)
- {
- if(GetPlayerMoney(playerid) > 10)
- {
- GivePlayerMoney(playerid, -10);
- SetPlayerAttachedObject( playerid, 0, 19049, 5, 0.000000, -0.007722, -0.011143, 9.279358, 270.517852, 190.637268, 1.000000, 1.000000, 1.000000 );
- return true;
- }
- }
- if(listitem == 11)
- {
- if(GetPlayerMoney(playerid) > 10)
- {
- GivePlayerMoney(playerid, -10);
- SetPlayerAttachedObject( playerid, 0, 19050, 5, 0.000000, -0.007722, -0.011143, 9.279358, 270.517852, 190.637268, 1.000000, 1.000000, 1.000000 );
- return true;
- }
- }
- if(listitem == 12)
- {
- if(GetPlayerMoney(playerid) > 10)
- {
- GivePlayerMoney(playerid, -10);
- SetPlayerAttachedObject( playerid, 0, 19051, 5, 0.000000, -0.007722, -0.011143, 9.279358, 270.517852, 190.637268, 1.000000, 1.000000, 1.000000 );
- return true;
- }
- }
- if(listitem == 13)
- {
- if(GetPlayerMoney(playerid) > 10)
- {
- GivePlayerMoney(playerid, -10);
- SetPlayerAttachedObject( playerid, 0, 19052, 5, 0.000000, -0.007722, -0.011143, 9.279358, 270.517852, 190.637268, 1.000000, 1.000000, 1.000000 );
- return true;
- }
- }
- if(listitem == 14)
- {
- if(GetPlayerMoney(playerid) > 10)
- {
- GivePlayerMoney(playerid, -10);
- SetPlayerAttachedObject( playerid, 0, 19053, 5, 0.000000, -0.007722, -0.011143, 9.279358, 270.517852, 190.637268, 1.000000, 1.000000, 1.000000 );
- return true;
- }
- }
- }
- }
- #endif
Advertisement
Add Comment
Please, Sign In to add comment