Geplaatst: 7 juni 200817 jaren comment_1009808 1 van de manieren die je zou kunnen gebruiken is: //Bovenaan je script: new tram; //OnGameModeInit(): tram = AddStaticVehice(tramID, x, y, z, blablabla); //Ergens onderaan je script: stock PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z) { new Float:oldposx, Float:oldposy, Float:oldposz; new Float:tempposx, Float:tempposy, Float:tempposz; GetPlayerPos(playerid, oldposx, oldposy, oldposz); tempposx = (oldposx -x); tempposy = (oldposy -y); tempposz = (oldposz -z); if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) { return 1; } return 0; } //OnPlayerCommandText if(strcmp(cmdtext, "/entertram", true)==0); { new Float:tramX, Float:tramY, Float:tramZ; GetVehiclePos(tram, tramX, tramY, tramZ); if(PlayerToPoint(10.0, playerid, tramX, tramY, tramZ)==1) { PutPlayerInVehicle(playerid, tram, 0); } else { SendClientMessage(playerid, 0xFF0000AA, "You're not close enough to a tram!"); } return 1; } Ik heb dit zo uit mn hoofd getypt (m.u.v. de 'PlayerToPoint'-functie, die is van Sa:mp forum. Ik weet dus niet of het nu zonder errors/warning compiled, of dat het uberhaupt werkt. Maar als het nog niet lukt, laat het ff weten
De titel zegt het al..