16.05.2015, 11:19
I had been developing an include similar to this but discontinued due to lack of interest. Seeing this, I remember few features that I had planned earlier. You've included a command argument but I don't see a good use of it. I suggest you to use the "CMD_NAME" array along with "OnPlayerCommandPerformed" (since zcmd and y_cmd are used frequently) so that the ones using this include don't require to create commands for teleport. It could be done completely in single line.
I had also planned to provide complete vehicle support and pedestrian support while teleporting, which also ensures that they teleport safe in case of streamer objects. Teleportation over an area could also improve this include where players could teleport to a random solid point in an area. These were few of them I planned earlier but I strongly suggest you to consider creating automatic commands. Here's an example of it:
I had also planned to provide complete vehicle support and pedestrian support while teleporting, which also ensures that they teleport safe in case of streamer objects. Teleportation over an area could also improve this include where players could teleport to a random solid point in an area. These were few of them I planned earlier but I strongly suggest you to consider creating automatic commands. Here's an example of it:
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success) {
if(!success) { //In case if it's not present in the script, only then we've to check.
for(new i = 0; i< MAX_TELEPORTS; i++) { //Loop through teleport data
if(!strcmp(cmdtext, TeleportData[i][CMD_NAME], true, strlen(TeleportData[i][CMD_NAME]]) {
//Teleport
}
}
}
return 1;
}