10.02.2014, 20:41
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
#if defined FILTERSCRIPT
new DrugDealerJob[256];
AddStaticVehicle(482,1772.6602,-2048.9277,13.6440,270.5698,3,0);
AddStaticVehicle(451,1773.2407,-2042.7849,13.6227,269.7848,3,4);
AddStaticVehicle(456,1772.5969,-2037.0247,13.6003,270.9971,3,6);
AddStaticVehicle(482,1772.4786,-2031.4073,13.5899,270.2319,3,1);
public OnPlayerCommandText(playerid, cmdtext[])
{
//Dealer
if (strcmp("/Deal", cmdtext, true, 10) == 0)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 482)
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 451)
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 456)
{
SmugglerJob[playerid] = 1;
SetPlayerCheckpoint(playerid,1751.0360,-2058.4458,13.5892,10);
SendClientMessage(playerid, 0xFFFF00AA, "* Get the drugs from the garage, inorder to gain money!");
return 1;
}
SendClientMessage(playerid, 0xFFFF00AA,"You have to be in a DrugDealing vehicle to do this!");
}
public OnPlayerEnterCheckpoint(playerid)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 482)
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 451)
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 456)
{
if(SmugglerJob[playerid] == 1){
SmugglerJob[playerid] = 2;
SetPlayerCheckpoint(playerid,1751.0360,-2058.4458,13.5892,10);
SendClientMessage(playerid, 0xFFFF00AA, "*Crazy ED: Move your lazzy ass to bayside and deliver those Drugs!");
return 1;
}
if(SmugglerJob[playerid] == 2){
SmugglerJob[playerid] = 3;
SetPlayerCheckpoint(playerid,-2431.2441,2312.9509,4.9844,10);
return 1;
}
if(SmugglerJob[playerid] == 3){
SmugglerJob[playerid] = 0;
SendClientMessage(playerid, 0xFFFF00AA, "*Crazy ED: Fine... Here you go! Come back soon when you get more Drugs! Now piss off!");
SendClientMessage(playerid, 0xFFFF00AA, "Gradulations. You have completed your Smuggling route. You have received 20000$");
GivePlayerMoney(playerid, 20000);
DisablePlayerCheckpoint(playerid);
return 1;
}
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
if(DrugDealerJob[playerid] > 0)
{
DrugDealerJob[playerid] = 0;
DisablePlayerCheckpoint(playerid);
}
}
Command : /deal
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
#if defined FILTERSCRIPT
new DrugDealerJob[256];
AddStaticVehicle(482,1772.6602,-2048.9277,13.6440,270.5698,3,0);
AddStaticVehicle(451,1773.2407,-2042.7849,13.6227,269.7848,3,4);
AddStaticVehicle(456,1772.5969,-2037.0247,13.6003,270.9971,3,6);
AddStaticVehicle(482,1772.4786,-2031.4073,13.5899,270.2319,3,1);
public OnPlayerCommandText(playerid, cmdtext[])
{
//Dealer
if (strcmp("/Deal", cmdtext, true, 10) == 0)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 482)
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 451)
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 456)
{
SmugglerJob[playerid] = 1;
SetPlayerCheckpoint(playerid,1751.0360,-2058.4458,13.5892,10);
SendClientMessage(playerid, 0xFFFF00AA, "* Get the drugs from the garage, inorder to gain money!");
return 1;
}
SendClientMessage(playerid, 0xFFFF00AA,"You have to be in a DrugDealing vehicle to do this!");
}
public OnPlayerEnterCheckpoint(playerid)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 482)
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 451)
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 456)
{
if(SmugglerJob[playerid] == 1){
SmugglerJob[playerid] = 2;
SetPlayerCheckpoint(playerid,1751.0360,-2058.4458,13.5892,10);
SendClientMessage(playerid, 0xFFFF00AA, "*Crazy ED: Move your lazzy ass to bayside and deliver those Drugs!");
return 1;
}
if(SmugglerJob[playerid] == 2){
SmugglerJob[playerid] = 3;
SetPlayerCheckpoint(playerid,-2431.2441,2312.9509,4.9844,10);
return 1;
}
if(SmugglerJob[playerid] == 3){
SmugglerJob[playerid] = 0;
SendClientMessage(playerid, 0xFFFF00AA, "*Crazy ED: Fine... Here you go! Come back soon when you get more Drugs! Now piss off!");
SendClientMessage(playerid, 0xFFFF00AA, "Gradulations. You have completed your Smuggling route. You have received 20000$");
GivePlayerMoney(playerid, 20000);
DisablePlayerCheckpoint(playerid);
return 1;
}
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
if(DrugDealerJob[playerid] > 0)
{
DrugDealerJob[playerid] = 0;
DisablePlayerCheckpoint(playerid);
}
}
Command : /deal