Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define MAX_ENTRANCES 100
- enum entInfo
- {
- entName[ 128 ],
- Float:entXx,
- Float:entYy,
- Float:entZz,
- Float:iXx,
- Float:iYy,
- Float:iZz,
- iIntt,
- Text3D:entLabel,
- Zte[256],
- bool:enabled
- }
- new
- entData[ MAX_ENTRANCES ][ entInfo ];
- new
- totalEntrances;
- stock Entrance( name[], Float:entX, Float: entY, Float:entZ, Float:iX, Float:iY, Float:iZ, iInt )
- {
- totalEntrances ++;
- entData[ totalEntrances ][ enabled ] = true;
- format( entData[ totalEntrances ][ entName ], 128, "%s", name );
- entData[ totalEntrances ][ entXx ] = entX;
- entData[ totalEntrances ][ entYy ] = entY;
- entData[ totalEntrances ][ entZz ] = entZ;
- entData[ totalEntrances ][ iXx ] = iX;
- entData[ totalEntrances ][ iYy ] = iY;
- entData[ totalEntrances ][ iZz ] = iZ;
- entData[ totalEntrances ][ iIntt ] = iInt;
- new tmpStr[ 185 ];
- format(tmpStr, 185, "{8C8C8C}%s\n{8C8C8C}Spauskite {00CC00}[ENTER]", name );
- entData[ totalEntrances ][ entLabel ] = Create3DTextLabel( tmpStr, 0x008080FF, entX, entY, entZ, 10, 0, 0);
- CreatePickup(19197, 23, entX, entY, entZ, 0);
- return totalEntrances;
- }
- stock EntranceWithMSG(name[], Float:entX, Float: entY, Float:entZ, Float:iX, Float:iY, Float:iZ, iInt, text[])
- {
- totalEntrances ++;
- entData[ totalEntrances ][ enabled ] = true;
- format( entData[ totalEntrances ][ entName ], 128, "%s", name );
- entData[ totalEntrances ][ entXx ] = entX;
- entData[ totalEntrances ][ entYy ] = entY;
- entData[ totalEntrances ][ entZz ] = entZ;
- entData[ totalEntrances ][ iXx ] = iX;
- entData[ totalEntrances ][ iYy ] = iY;
- entData[ totalEntrances ][ iZz ] = iZ;
- entData[ totalEntrances ][ iIntt ] = iInt;
- format(entData[ totalEntrances ][ Zte ], 256, "%s", text);
- new tmpStr[ 185 ];
- format(tmpStr, 185, "{8C8C8C}%s\n{8C8C8C}Spauskite {00CC00}[ENTER]", name );
- entData[ totalEntrances ][ entLabel ] = Create3DTextLabel( tmpStr, 0x008080FF, entX, entY, entZ, 10, 0, 0);
- CreatePickup(19197, 23, entX, entY, entZ, 0);
- return totalEntrances;
- }
- stock DeleteEntrance( eID )
- {
- entData[ eID ][ enabled ] = false;
- Delete3DTextLabel( entData[ eID ][ entLabel ] );
- return 1;
- }
- stock EntranceKey(playerid, newkeys)
- {
- if (newkeys & KEY_SECONDARY_ATTACK)
- {
- for( new e; e < MAX_ENTRANCES; e++)
- {
- if( entData[ e ][ enabled ] )
- {
- if( IsPlayerInRangeOfPoint( playerid, 2, entData[ e ][ entXx ], entData[ e ][ entYy ], entData[ e ][ entZz ] ))
- {
- SetPlayerPos( playerid, entData[ e ][ iXx ], entData[ e ][ iYy ], entData[ e ][ iZz ]);
- SetPlayerInterior( playerid, entData[ e ][ iIntt ] );
- SendClientMessage(playerid, -1, entData[ e ][ Zte ]);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement