Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Napraveno za 5minuti
- Napravil: Tino Skripter
- rabota ribar
- */
- #include <a_samp>
- //==============================================================================
- #define INFO(%0,%1) SendClientMessage(%0, -1, "{CC0000}INFO:{FFFFFF} "%1)
- #define ZA3DTEXT 0x00F5FFFF
- #define COLOR_GRAD1 0xB4B5B7FF
- //==============================================================================
- new Rabota[MAX_PLAYERS] = 0;
- //==============================================================================
- public OnGameModeInit()
- {
- //==============================================================================
- Create3DTextLabel("{CC0000}(( {FFFFFF} RIBAR {CC0000}))\n{FFFFFF}Koristete Y",ZA3DTEXT,356.9217,-2071.0710,10.6953,15.0, 0);//RIBAR
- AddStaticPickup(1210, 1, 356.9217,-2071.0710,10.6953);//RIBAR
- //RIBAR JADICI
- Create3DTextLabel("{CC0000}[ RIBAR ]\n{FFFFFF}Koristete Y",ZA3DTEXT,349.8644,-2052.1431,7.8359,15.0, 0);//RIBAR
- AddStaticPickup(1318, 1, 349.8644,-2052.1431,7.8359);//RIBAR
- Create3DTextLabel("{CC0000}[ RIBAR ]\n{FFFFFF}Koristete Y",ZA3DTEXT,349.9125,-2059.6753,7.8359,15.0, 0);//RIBAR
- AddStaticPickup(1318, 1, 349.9125,-2059.6753,7.8359);//RIBAR
- Create3DTextLabel("{CC0000}[ RIBAR ]\n{FFFFFF}Koristete Y",ZA3DTEXT,349.9229,-2064.7656,7.8359,15.0, 0);//RIBAR
- AddStaticPickup(1318, 1, 349.9229,-2064.7656,7.8359);//RIBAR
- Create3DTextLabel("{CC0000}[ RIBAR ]\n{FFFFFF}Koristete Y",ZA3DTEXT,349.9342,-2067.2781,7.8359,15.0, 0);//RIBAR
- AddStaticPickup(1318, 1, 349.9342,-2067.2781,7.8359);//RIBAR
- Create3DTextLabel("{CC0000}[ RIBAR ]\n{FFFFFF}Koristete Y",ZA3DTEXT,349.9578,-2072.4248,7.8359,15.0, 0);//RIBAR
- AddStaticPickup(1318, 1, 349.9578,-2072.4248,7.8359);//RIBAR
- //==============================================================================
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- //==============================================================================
- if(newkeys == KEY_YES)
- {
- if(IsPlayerToPoint(playerid, 5, 356.9217,-2071.0710,10.6953))
- {
- if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) return 0;
- if(Rabota[playerid] == 0)
- {
- SetPlayerAttachedObject(playerid, 10,18632,6,0.079376,0.037070,0.007706,181.482910,0.000000,0.000000,1.000000,1.000000,1.000000);
- SendClientMessage(playerid,-1,"{CC0000}[TinoScript]{FFFFFF}Se vrabotivte kako Ribar.");
- SetPlayerSkin(playerid, 35);
- Rabota[playerid] = 10;
- }
- else
- {
- Rabota[playerid] = 0;
- RemovePlayerAttachedObject(playerid,10);
- SendClientMessage(playerid,-1,"{CC0000}[TinoScript]{FFFFFF}Dadovte otkaz od rabotata.");
- }
- }
- if(IsPlayerToPoint(playerid, 2, 349.8644,-2052.1431,7.8359) || IsPlayerToPoint(playerid, 2, 349.9125,-2059.6753,7.8359) || IsPlayerToPoint(playerid, 2, 349.9229,-2064.7656,7.8359) || IsPlayerToPoint(playerid, 2, 349.9342,-2067.2781,7.8359) || IsPlayerToPoint(playerid, 2, 349.9578,-2072.4248,7.8359))
- {
- if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) return 0;
- if(Rabota[playerid] == 10)
- {
- Rabota[playerid] = 20;
- TogglePlayerControllable(playerid,0);
- ApplyAnimation(playerid,"SWORD","sword_block",50.0 ,0,1,0,1,1);
- ApplyAnimation(playerid,"SWORD","sword_block",50.0 ,0,1,0,1,1);
- INFO(playerid, "Ja frlivte jadicata pocekajte.. !");
- SetTimerEx("Ribar",30000, false, "i", playerid);
- } else INFO(playerid, "Ne ste vraboten kako ribar !");
- }
- }
- //==============================================================================
- return 1;
- }
- //==============================================================================
- forward Ribar(playerid);
- public Ribar(playerid)
- {
- ApplyAnimation(playerid,"SWORD","sword_block",50.0 ,0,1,0,1,1);
- ClearAnimations(playerid);
- SetPlayerSpecialAction(playerid,SPECIAL_ACTION_NONE);
- SendClientMessage(playerid, COLOR_GRAD1, "{CC0000}[TinoScript] | {FFFFFF}Zavrsivte so rabota!, i dobivte 5000$.");
- Rabota[playerid] = 10;
- GivePlayerMoney(playerid,5000);
- TogglePlayerControllable(playerid,1);
- return 1;
- }
- //==============================================================================
- forward IsPlayerToPoint(playerid, Float:radi, Float:x, Float:y, Float:z);
- public IsPlayerToPoint(playerid, Float:radi, 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 1;
- }
- }
- return 0;
- }
- //==============================================================================
Advertisement
Add Comment
Please, Sign In to add comment