11.01.2015, 19:12
pawn Код:
new rand = random(sizeof(DROPMATS));
SetPlayerCheckpoint(playerid, DROPMATS[rand][0], DROPMATS[rand][1], DROPMATS[rand][2], 3);
// Add THIS
new string[128],location[32];
// Find out what location was randomly chosen, and format the location string accordingly
if(rand == 0)) format(location,32,"Location 1");
if(rand == 1)) format(location,32,"Location 2");
if(rand == 2)) format(location,32,"Location 3");
if(rand == 3)) format(location,32,"Location 4");
if(rand == 4)) format(location,32,"Location 5");
if(rand == 5)) format(location,32,"Location 6");
if(rand == 6)) format(location,32,"Location 7");
// Create a string including the name of the location, e.g "Location 1"
format(string,sizeof(string),"The package reads %s. Deliver it to the red marker.",location);
SendClientMessage(playerid,-1, string);
it actually works, i have not tested or looked for any errors in your code.
I haven't scripted for years so I could've made a mistake.