16.06.2012, 16:13
Okay here you go bro
pawn Код:
#include <a_samp>
new jobs;
new mechanic[MAX_PLAYERS];
new taxier[MAX_PLAYERS];
new busdriver[MAX_PLAYERS];
public OnFilterScriptInit()
{
jobs = CreatePickup(1239,1,362.4671,173.6203,1008.3828,-1);
return 1;
}
public OnPlayerConnect(playerid)
{
mechanic[playerid]=0;
taxier[playerid]=0;
busdriver[playerid]=0;
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
new mechanic;
if(strcmp(cmdtext, "/repair", true) == 0)
{
if(mechanic[playerid] == 0) return SendClientMessage(playerid,0xD6D6D6AA,"You are not mechanic, donot use this command again");
{
else if(mechanic[playerid] == 1)
{
SetVehicleHealth(GetPlayerVehicleID(playerid), 1000);
SendClientMessage(playerid,0xD6D6D6AA,"Sir!, The Vehicle has been repaired, and Your moneys have been -500");
GivePlayerMoney(playerid, -500);
}
}
return 1;
}
return 0;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == jobs)
{
ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Which job you want to take","Mechanic\n TaxiDriver\n BusDriver","Select","Exit");
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid==1 && response==1)
{
switch(listitem)
{
case 0:
{
ShowPlayerDialog(playerid,2,DIALOG_STYLE_MSGBOX,"Mechanic","Congratulations, you have been taken the mechanic job, go to the mechanic park now");
mechanic[playerid] = 1;
}
case 1:
{
ShowPlayerDialog(playerid,2,DIALOG_STYLE_MSGBOX,"Mechanic","Congratulations, you have been taken the Taxi job, go to the taxi park now");
taxier[playerid] = 1;
}
case 2:
{
ShowPlayerDialog(playerid,2,DIALOG_STYLE_MSGBOX,"Mechanic","Congratulations, you have been taken the bus job, go to the bus park now");
busdriver[playerid] = 1;
}
}
}
return 1;
}