Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <zcmd>
- new cowit[MAX_PLAYERS];
- new cow;
- new chickit[MAX_PLAYERS];
- new chick;
- new NRG[MAX_PLAYERS];
- //Do NOT remove the credits
- #define COLOR_RED 0xFF0000AA
- public OnFilterScriptInit()
- {
- //credits
- print("\n--------------------------------------");
- print("Cken Bike by mobiliz");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- DestroyObject(chick);
- DestroyObject(cow);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- chickit[playerid] = 0;
- cowit[playerid] = 0;
- //credits
- SendClientMessage(playerid,COLOR_RED,"Cken by mobiliz");
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- if (chickit[playerid] == 1)
- {
- DestroyObject(chick);
- chickit[playerid] = 0;
- }
- else if(cowit[playerid] == 1)
- {
- DestroyObject(cow);
- cowit[playerid] = 0;
- }
- return 1;
- }
- CMD:nrg(playerid, params[])
- {
- new Float:x, Float:y, Float:z, Float:angle;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerFacingAngle(playerid, angle);
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "Error: You already have a vehicle!");
- NRG[playerid] = AddStaticVehicle(522, x, y, z, angle, -1, -1);
- PutPlayerInVehicle(playerid, NRG[playerid], 0);
- return 1;
- }
- //cow
- CMD:cow(playerid, params[])
- {
- cow = CreateObject(16442,0,0,0,0,0,0,100);
- new Float:x, Float:y, Float:z;
- cowit[playerid] = 1;
- AttachObjectToVehicle(cow, GetPlayerVehicleID(playerid), x,y +0.5,z +0.5,0.0,0.0, 90.0);
- return 1;
- }
- //chicken
- CMD:chicken(playerid, params[])
- {
- chick = CreateObject(16776,0,0,0,0,0,0,100);
- new Float:x, Float:y, Float:z;
- chickit[playerid] = 1;
- AttachObjectToVehicle(chick, GetPlayerVehicleID(playerid), x +1,y,z,0.0,0.0,180.0);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement