03.02.2012, 13:26
hey guys,
i have made this deal thing so when a player does /deal it gets a random checkpoint somewhere but now i have the problem that when a player types /deal i want it says a message(sendclientmessage) that says whats the name of the player and what he is hauling...
and now the name works but the hauling thing not...
this is my code:
can anyone help me?
(i have the coords to 0.00 but that doesnt matter i want to change later i first want to make the nameof what he is hauling good)
greets niels
i have made this deal thing so when a player does /deal it gets a random checkpoint somewhere but now i have the problem that when a player types /deal i want it says a message(sendclientmessage) that says whats the name of the player and what he is hauling...
and now the name works but the hauling thing not...
this is my code:
pawn Код:
enum Deals
{
Name[50],
Float:xPos,
Float:yPos,
Float:zPos
}
new Jobs[][Deals] =
{
{ "Hauling Drugs", 0.00, 0.00, 0.00 },
{ "Hauling Weapons", 0.00, 0.00, 0.00 },
{ "Hauling Whores", 0.00, 0.00, 0.00 },
{ "Hauling Cars", 0.00, 0.00, 0.00 }
};
pawn Код:
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], Dealname[Deals], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
format(string, sizeof(string), "Player %s is now Hauling %d",pName, Dealname);
SendClientMessageToAll(playerid, string);
}
return 1;
}
(i have the coords to 0.00 but that doesnt matter i want to change later i first want to make the nameof what he is hauling good)
greets niels