31.05.2009, 07:17
Heres the CMD: http://pastebin.com/m310979ef
Whats wrong with it, the only bug I found with it...
Whats wrong with it, the only bug I found with it...
if(!strcmp(cmd,"/maketpexit",true)||!strcmp(cmd,"/mtpex",true))
{
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_GRAD1,"You can't use this while being in a car");
if(PlayerInfo[playerid][pAdmin]<4) return error(playerid);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid,COLOR_GRAD1,"[USAGE:] (/mtpex)/maketpexit [TPID]");
new tpid = strval(tmp);
new tpstring[128];
new Float:mteX,Float:mteY,Float:mteZ,Float:mteA;
GetPlayerPos(playerid,mteX,mteY,mteZ);
GetPlayerFacingAngle(playerid,mteA);
Teleport[tpid][tpexX]=mteX;
Teleport[tpid][tpexY]=mteY;
Teleport[tpid][tpexZ]=mteZ;
Teleport[tpid][tpexA]=mteA;
Teleport[tpid][tpexInterior]=GetPlayerInterior(playerid);
Teleport[tpid][tpexWorld]=GetPlayerVirtualWorld(playerid);
printf("Virtual World: %d.",Teleport[tpid][tpexWorld]);
SaveTeleports();
format(tpstring,sizeof(tpstring),"Dynamic Teleport %d Exit Location Set",tpid);
SendClientMessage(playerid,COLOR_ADMINCMD,tpstring);
return 1;
}