rendered paste body //-/teleport-
if(strcmp(cmd, "/teleport", true) == 0) {
new ttp;
new tmp[256];
tmp = strtok(cmdtext, idx);
ttp = strval(tmp);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_RED, "Usage: /teleport [ID]");
return 1;
}
if(GetPlayerMoney(playerid) < 25000) {
SendClientMessage(playerid, COLOR_RED, "You are out of cash.");
return 1;
}
if(GetPlayerMoney(playerid) > 24999) {
if(IsPlayerConnected(ttp)) {
new Float:x;
new Float:y;
new Float:z;
GetPlayerPos(ttp, x, y, z);
SetPlayerPos(playerid, x, y, z);
GivePlayerMoney(playerid, 0 - 25000);
SendClientMessage(playerid, COLOR_GREEN, "You are now teleported.");
SendClientMessage(ttp, COLOR_YELLOW, "Someone has been teleported to you :þ");
return 1;
}
}