All pastes #384899 Raw Edit

poop

public text v1 · immutable
·published 2007-03-07 12:42 UTC
rendered paste body
#include <a_samp>
#define CAR_PHONE_RING 20600 // drive by //drive by
#define CHECKPOINT_driveby 1 //drive by
#define CHECKPOINT_driveby2 2 //drive by
#define CHECKPOINT_drivebystart 3 // drive by
#define COLOR_GREEN 0x33AA33AA //driveby
#define COLOR_RED 0xAA3333AA // driveby
new gPlayerCheckpointStatus[MAX_PLAYERS]; //drive by


main()
{
	print("\n----------------------------------");
	print("  This is a blank GameModeScript");
	print("----------------------------------\n");
}


////////////////////////////////////////////////////
///////////////////////////////////////////////////

public IsPlayerInCube(playerid, xmin, ymin, zmin, xmax, ymax, zmax) {
   new Float:x, Float:y, Float:z;
   GetPlayerPos(playerid, x, y, z);
   if( x > xmin && y > ymin && z > zmin && x < xmax && y < ymax && z < zmax) return 1;
   return 0;
}




public OnPlayerEnterCheckpoint(playerid)
{
    switch (gPlayerCheckpointStatus[playerid])
    {

		 case CHECKPOINT_drivebystart: {
	    SetPlayerCheckpoint(playerid,2377.4026,-1908.9188,12.9885,5);
	    SendClientMessage(playerid,0x33AA33AA,"As you are about to walk into oj locs house");
        SendClientMessage(playerid,0x33AA33AA,"your homies say they are hungry,so now you and your homies");
	    SendClientMessage(playerid,0x33AA33AA,"Are on the way to Clucken Bell");
		 }

		 case CHECKPOINT_driveby: {
	    PlayerPlaySound(playerid, 20600, 2377.4026,-1908.9188,12.9885);
		SendClientMessage(playerid,0x33AA33AA,"Sweet: Man you need to hual ass over to the grove!");
		SendClientMessage(playerid,0xAA3333AA,"Sweet: Ballas are Rolling!!");
	    SetTimer("kill",2000,1);
    	SetPlayerCheckpoint(playerid,2377.4026,-1908.9188,12.9885,5);
		}
		
		case CHECKPOINT_driveby2: {
		 KillTimer(1);
   	     SendClientMessage(playerid,0xAA3333AA,"Sweet: Good Job man we Cleaned those Mo fukas out!");
   	     GivePlayerMoney(playerid, 200);
		}

	}
    return 1;
}


public kill(playerid)
{

 SetPlayerHealth(playerid, 0.0);

}


public drivebystart(playerid)
{
    for (new i = 0; i < MAX_PLAYERS; i++)
    {
          if (IsPlayerConnected(i))
          {
            if(IsPlayerInCube(playerid,2343,1663,0,2508,1933,20))
             {
                gPlayerCheckpointStatus[i] = CHECKPOINT_drivebystart;
 			    SetPlayerCheckpoint(i,2486.5706,-1646.4824,14.0703,5);
             }
             else
             {
                DisablePlayerCheckpoint(i);
             }
          }
    }
}

public driveby(playerid)
{
    for (new i = 0; i < MAX_PLAYERS; i++)
    {
          if (IsPlayerConnected(i))
          {
            if(IsPlayerInCube(playerid,2343,1663,0,2508,1933,20))
             {
                gPlayerCheckpointStatus[i] = CHECKPOINT_driveby;
 		    	SetPlayerCheckpoint(i,2377.4026,-1908.9188,12.9885,5);
             }
             else
             {
                DisablePlayerCheckpoint(i);
             }
          }
    }
}

public driveby2(playerid)
{
    for (new i = 0; i < MAX_PLAYERS; i++)
    {
          if (IsPlayerConnected(i))
          {
            if(IsPlayerInCube(playerid,2343,1663,0,2508,1933,20))
             {
                gPlayerCheckpointStatus[i] = CHECKPOINT_driveby2;
 			SetPlayerCheckpoint(i,2487.2593,-1666.7709,13.0814,5);
             }
             else
             {
                DisablePlayerCheckpoint(i);
             }
          }
    }
}

////////////////////////////////////////////////////
///////////////////////////////////////////////////

public OnGameModeInit()
{
	print("GameModeInit()"); // drive by
	SetTimer("driveby", 100,1); // drive by
	SetTimer("drivebystart", 100,1); // drive by
	SetTimer("driveby2", 100,1); // drive by
	SetTimer("kill", 20000,1); // drive by
	SetGameModeText("Blank Script");
	AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
	return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
	printf("OnPlayerRequestClass(%d, %d)", playerid, classid);
	SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
	SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
	SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
	return 1;
}

public OnGameModeExit()
{
	print("GameModeExit()");
	return 1;
}

public OnPlayerConnect(playerid)
{
	printf("OnPlayerConnect(%d)", playerid);
	return 1;
}

public OnPlayerDisconnect(playerid)
{
	printf("OnPlayerDisconnect(%d)", playerid);
	return 1;
}

public OnPlayerSpawn(playerid)
{
	printf("OnPlayerSpawn(%d)", playerid);
	return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
	printf("OnPlayerDeath(%d, %d, %d)", playerid, killerid, reason);
	return 1;
}

public OnVehicleSpawn(vehicleid)
{
	printf("OnVehicleSpawn(%d)", vehicleid);
	return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
	printf("OnVehicleDeath(%d, %d)", vehicleid, killerid);
	return 1;
}

public OnPlayerText(playerid)
{
	printf("OnPlayerText(%d)", playerid);
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp(cmdtext, "/mycommand", true)==0)
	{
	    /* Do something here */
	    return 1;
	}
	return 0;
}

public OnPlayerInfoChange(playerid)
{
	printf("OnPlayerInfoChange(%d)");
	return 1;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	printf("OnPlayerEnterVehicle(%d, %d, %d)", playerid, vehicleid, ispassenger);
	return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
	printf("OnPlayerExitVehicle(%d, %d)", playerid, vehicleid);
	return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
	printf("OnPlayerStateChange(%d, %d, %d)", playerid, newstate, oldstate);
	return 1;
}