Nézd itt van amit Bendi Írt
CMD:createtele(playerid,params[]){
new Float:x,Float:y,Float:z,File[128];
if(isnull(params)) return SendClientMessage(playerid,-1,\"{005eff}Használat:/createtele [név]\");
format(File,128,\"%s.ini\",params);
if(dini_Exists(File)) return SendClientMessage(playerid,-1,\"{005eff}Már létezik ilyen teleport!\");
dini_Create(File);
GetPlayerPos(playerid,x,y,z);
dini_FloatSet(File,\"x\",x);
dini_FloatSet(File,\"y\",y);
dini_FloatSet(File,\"z\",z);
SendClientMessage(playerid,-1,\"{005eff}Teleport létrehozva!\");
return 1;
}
CMD:deletetele(playerid,params[]){
new File[128];
if(isnull(params)) return SendClientMessage(playerid,-1,\"{005eff}Használat:/deletetele [név]\");
format(File,128,\"%s.ini\",params);
if(!dini_Exists(File)) return SendClientMessage(playerid,-1,\"{005eff}Nem létezik ilyen teleport!\");
dini_Remove(File);
return 1;
}
public OnPlayerCommandPerformed(playerid, cmdtext[], success){
new File[128];
strdel(cmdtext,0,1);
format(File,128,\"%s.ini\",cmdtext);
if(dini_Exists(File)){
SetPlayerPos(playerid,dini_Float(File,\"x\"),dini_Float(File,\"y\"),dini_Float(File,\"z\"));
SendClientMessage(playerid,-1,\"{005eff}Sikeres teleportálás!\");
}
return 1;
}