21.01.2010, 13:34
So Ive just made a Co-ordinate Generator, That Saves The co ords to a file
Ill Release it
i now need to make the Teleports
Ive got one teleport code, I got it from the samp forums This is the code
#define FILTERSCRIPT
#include <a_samp>
public OnPlayerCommandText(playerid, cmdtext[]) {
if (!strcmp(cmdtext,"/teleport",true)) { // /center is what the player enter into the text field
if (IsPlayerInAnyVehicle(playerid)) { //Checks if player is inside a vehicle
SetVehiclePos(GetPlayerVehicleID(playerid),0.0,0.0 ,200.0); // Teleports the vehicle
SendClientMessage(playerid, 0xEE66EEFF, "Teleportation Successful");
} else {
SetPlayerPos(playerid,653.954895,-1223.468139,17.173387); // teleports the player
SendClientMessage(playerid, 0xEE66EEFF, "Teleportation Successful");
}
return 1;
}
return 0;
}
That Code works fine and teleports me Fine![Smiley](images/smilies/smile.png)
but its Time to add another Teleport
Like /drift1 /drift2
i dont wanna make lots of Pwn Files containing one teleport each
how would i Make it twice?
I Copied and pasted it below and it gives me loads of errors
ive put it Above the returns still errors
can Someone Rewrite That, With no errors, The same teleport twice?
Hope that makes Sence, So i can see the patten and make like 10 teleports For cool locations
Thanks Guys
-Lipsmoker
![Smiley](images/smilies/smile.png)
i now need to make the Teleports
Ive got one teleport code, I got it from the samp forums This is the code
#define FILTERSCRIPT
#include <a_samp>
public OnPlayerCommandText(playerid, cmdtext[]) {
if (!strcmp(cmdtext,"/teleport",true)) { // /center is what the player enter into the text field
if (IsPlayerInAnyVehicle(playerid)) { //Checks if player is inside a vehicle
SetVehiclePos(GetPlayerVehicleID(playerid),0.0,0.0 ,200.0); // Teleports the vehicle
SendClientMessage(playerid, 0xEE66EEFF, "Teleportation Successful");
} else {
SetPlayerPos(playerid,653.954895,-1223.468139,17.173387); // teleports the player
SendClientMessage(playerid, 0xEE66EEFF, "Teleportation Successful");
}
return 1;
}
return 0;
}
That Code works fine and teleports me Fine
![Smiley](images/smilies/smile.png)
but its Time to add another Teleport
Like /drift1 /drift2
i dont wanna make lots of Pwn Files containing one teleport each
how would i Make it twice?
I Copied and pasted it below and it gives me loads of errors
ive put it Above the returns still errors
can Someone Rewrite That, With no errors, The same teleport twice?
Hope that makes Sence, So i can see the patten and make like 10 teleports For cool locations
Thanks Guys
-Lipsmoker