//on the top
enum dpInfo
{
dpName[24],
Float:dp_x,
Float:dp_y,
Float:dp_z,
};
new Float:DeliveryPoints[][dpInfo] = {
{"Shody Used Autos",1664.9709,1805.9022,10.8203},
{"Las Venturas Hospital",1605.6575,1844.7755,10.8203},
{"Las Venturas Airport",1716.4977,1453.9136,10.8007},
{"Las Venturas City Hall",2427.5752,1123.2358,10.6719}
};
new DeliveryItemNames[][32] = {
{"Delivery item 1"},
{"Delivery item 2"},
{"Delivery item 3"},
{"Delivery item 4"}
};
//onplayercmd
if(strcmp(cmdtext,"/delivery",true)==0)
{
new vehicleid = GetPlayerVehicleID(playerid);
new CarID = GetVehicleModel(vehicleid);
if(CarID == 515 || CarID == 514 || CarID == 514)
{
new rand = random(sizeof(DeliveryPoints));
new nrand = random(sizeof(DeliveryItemNames));
SetPlayerRaceCheckpoint(playerid,2,DeliveryPoints[rand][dp_x],DeliveryPoints[rand][dp_y],DeliveryPoints[rand][dp_z],0.0,0.0,0.0,10);
DeliveryPoints[rand][dpName] = DeliveringLocation[playerid];
DeliveryItemNames[nrand] = DeliveringItems[playerid];
format(string,sizeof(string),"(TRUCKERS): %s (%d) is now delivering %s to %s",ReturnPlayerName(playerid),playerid,DeliveryItemNames[nrand],DeliveryPoints[rand][dpName]);
SendClientMessageToAll(COLOR_YELLOW,string);
}
return 1;
}
Originally Posted by ʞɹod ɹǝpıds || SpiderPork
GetPlayerName
|
Originally Posted by <__Ethan__>
EDIT: i forgot to add, the race checkpoints ARE spawning on the map so i know that's right its just the names that don't show up
|
new string[128], name[MAX_PLAYER_NAME];
format(string, sizeof(string), "%s has joined the server.", name);
SendClientMessageToAll(RED, string);
new string[128], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s has joined the server.", name);
SendClientMessageToAll(RED, string);