04.02.2012, 14:27
Actually there is only one little mistake and its quit obviously if you test the command
But it doesnt seems that you are able to fix it by yourself...
But it doesnt seems that you are able to fix it by yourself...
pawn Код:
// same
enum Deals
{
Name[50],
Float:xPos,
Float:yPos,
Float:zPos
}
pawn Код:
// just removed the "Hauling "
stock const Jobs[][Deals] =
{
{ "Drugs", 0.00, 0.00, 0.00 },
{ "Weapons", 0.00, 0.00, 0.00 },
{ "Whores", 0.00, 0.00, 0.00 },
{ "Cars", 0.00, 0.00, 0.00 }
};
pawn Код:
// changed the last "%d" to "%s" in format because its a string
CMD:deal(playerid, params[])
{
new pick = random(sizeof(Jobs));
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "You are not in any vehicle");
{
SetPlayerCheckpoint(playerid, Jobs[pick][xPos], Jobs[pick][yPos], Jobs[pick][zPos], 7.0);
new string[128], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
format(string, sizeof(string), "{FF0000}Player %s is now Hauling %s",pName, Jobs[pick][Name]);
SendClientMessageToAll(playerid, string); // the first parameter is the color not the playerid, but that doesnt matter if you set a color in the text with "{}"
}
return 1;
}

