06.06.2013, 20:10
Okay so i have another question regarding my FS that im working on. How would i set the players job to JOB_TAXI? how would i make either of those change?
pawn Код:
enum
{
JOB_NONE,
JOB_TAXI,
}
new pJob[MAX_PLAYERS];
CMD:taxijob(playerid, params[])
{
for(new i; i < MAX_PLAYERS; i++)
if(pJob[i] == JOB_TAXI)return SendClientMessage(playerid, COLOR_LIGHTRED, "ERROR: {FFFFFF}You are already in a job.");
SetPlayerCheckpoint(playerid,1743.5216,-1862.2520,13.5765,5);
SendClientMessage(playerid, COLOR_LIGHTRED, "JOB INFO: {FFFFFF}An Icon has been put on your radar!");
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == TaxiPickup)
{
DisablePlayerCheckpoint(playerid);
ShowPlayerDialog(playerid,DIALOG_TAXI,DIALOG_STYLE_MSGBOX,"Taxi Job","Would you like to work with us at the Los Santos Taxi service?","Accept","Reject");
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_TAXI)
{
if(response)
{
for(new i; i < MAX_PLAYERS; i++)
if(pJob[i] == JOB_NONE)
{
//How would I set the players job to JOB_TAXI?
SendClientMessage(playerid, COLOR_LIGHTRED, "JOB INFO: {FFFFFF}You have accepted the job, please get in a Taxi.");
}
else if(!response)
{
SendClientMessage(playerid, COLOR_LIGHTRED, "JOB INFO: {FFFFFF}You have rejected the job");
}
}
return 1;
}
return 0;
}