Szerző Téma: spawn ahol kiléptél  (Megtekintve 1181 alkalommal)

spawn ahol kiléptél
« Dátum: 2012. Április 18. - 16:58:48 »
0 Show voters
hogy lehet megoldani azt hogy oda spawnoljon ahol kilépsz?
elöre is köszönöm
u. i.:ha meg nem volt a szerveren akkor legyen egy adot hely ahova spawnolja
« Utoljára szerkesztve: 2012. Április 18. - 17:02:20 írta N@rbirock »

Nem elérhető Rupert

  • 2301
    • Profil megtekintése
spawn ahol kiléptél
« Válasz #1 Dátum: 2012. Április 18. - 17:17:29 »
+1 Show voters
Tessék:
 
#include <a_samp>
#include <dini>
#include <dutils>
new file[128];
new Float:X[MAX_PLAYERS], Float:Y[MAX_PLAYERS], Float:Z[MAX_PLAYERS];
public OnFilterScriptInit()
{
print(\"\\n--------------------------------------\");
print(\" Pos mento by Rupert\");
print(\"--------------------------------------\\n\");
return 1;
}
public OnFilterScriptExit()
{
print(\"Pos mento bezarva!\");
return 1;
}
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
new name[MAX_PLAYER_NAME];
GetPlayerPos(playerid, X[playerid], Y[playerid], Z[playerid]);
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), \"/pos/%s.ini\", name);
if(!dini_Exists(file)) return dini_Create(file);
dini_IntSet(file, \"Lx\", X[playerid]);
dini_IntSet(file, \"Ly\", Y[playerid]);
dini_IntSet(file, \"Lz\", Z[playerid]);
return 1;
}
public OnPlayerSpawn(playerid)
{
    new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
new Float:Xx, Float:Yy, Float:Zz;
format(file, sizeof(file), \"/pos/%s.ini\", name);
if(!dini_Exists(file))
{
    dini_IntSet(file, \"Lx\", X[playerid]);
dini_IntSet(file, \"Ly\", Y[playerid]);
dini_IntSet(file, \"Lz\", Z[playerid]);
SetPlayerPos(playerid, 257.043304, -139.752044, 1.578125);
}
else
{
Xx = dini_Int(file, \"Lx\");
Yy = dini_Int(file, \"Ly\");
Zz = dini_Int(file, \"Lz\");
SetPlayerPos(playerid, Xx, Yy, Zz);
}
return 1;
}

 
Ui: \'Scriptfiles\' mappában legyen \'pos\' mappa.

spawn ahol kiléptél
« Válasz #2 Dátum: 2012. Április 18. - 17:26:10 »
0 Show voters
De nem ajánlom!
Figyelem!
Elõfordul az hogy kapsz egy crast kocsiban és visszaakar dobni a játék arra a pontra ahol a kocsi van...
Mi Történik?:
Újabb crash

Nem elérhető Rupert

  • 2301
    • Profil megtekintése
spawn ahol kiléptél
« Válasz #3 Dátum: 2012. Április 18. - 17:28:26 »
0 Show voters
Idézetet írta: bence67 date=1334762770\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"20358\" data-ipsquote-contentclass=\"forums_Topic
De nem ajánlom!
Figyelem!
Elõfordul az hogy kapsz egy crast kocsiban és visszaakar dobni a játék arra a pontra ahol a kocsi van...
Mi Történik?:
Újabb crash
 
Ki lehet küszöbölni, egy if elágazással.

spawn ahol kiléptél
« Válasz #4 Dátum: 2012. Április 18. - 17:32:04 »
0 Show voters
D:\\roleyp\\gamemodes\\rp.pwn(250) : warning 213: tag mismatch
D:\\roleyp\\gamemodes\\rp.pwn(251) : warning 213: tag mismatch
D:\\roleyp\\gamemodes\\rp.pwn(252) : warning 213: tag mismatch
D:\\roleyp\\gamemodes\\rp.pwn(263) : warning 213: tag mismatch
D:\\roleyp\\gamemodes\\rp.pwn(264) : warning 213: tag mismatch
D:\\roleyp\\gamemodes\\rp.pwn(265) : warning 213: tag mismatch
Pawn compiler 3.2.3664           Copyright © 1997-2006, ITB CompuPhase
6 Warnings.
 dini_IntSet ezekre írja a warningot

Nem elérhető kurta999

  • 2759
  • Éllő fédisznó
    • Profil megtekintése
spawn ahol kiléptél
« Válasz #5 Dátum: 2012. Április 18. - 18:10:38 »
+1 Show voters
dini_FloatSet-et használj, mivel a pozíció az tizedes szám, nem sima integer..
Ajánlott még menteni az Interiort és a VirtualWorld-öt is, esetleg még a forgást.

Nem elérhető Rupert

  • 2301
    • Profil megtekintése
spawn ahol kiléptél
« Válasz #6 Dátum: 2012. Április 18. - 18:48:20 »
0 Show voters
Igazad van, most elkapkodtam.  :confused:

spawn ahol kiléptél
« Válasz #7 Dátum: 2012. Április 18. - 18:52:08 »
0 Show voters
nem ír semi erort de ezt csinálja
\"sa-mp-049_www.kepfeltoltes.hu_.png\"

Nem elérhető Rupert

  • 2301
    • Profil megtekintése
spawn ahol kiléptél
« Válasz #8 Dátum: 2012. Április 18. - 19:08:25 »
0 Show voters
Idézetet írta: N@rbirock date=1334767928\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"20358\" data-ipsquote-contentclass=\"forums_Topic
nem ír semi erort de ezt csinálja
\"sa-mp-049_www.kepfeltoltes.hu_.png\"
 
Nincs
public OnPlayerRequestClass

 
eljárásod.

spawn ahol kiléptél
« Válasz #9 Dátum: 2012. Április 18. - 19:10:22 »
0 Show voters
de van

Nem elérhető Norby

  • 1575
    • Profil megtekintése
spawn ahol kiléptél
« Válasz #10 Dátum: 2012. Április 19. - 15:33:05 »
+1 Show voters
Az a baj hogy nincs be rakva skined!
AddPlayerClass
vagy az OnPlayerSpawn alatt vannak a skinek rakd be skint!

spawn ahol kiléptél
« Válasz #11 Dátum: 2012. Április 19. - 18:21:53 »
0 Show voters
müködik köszönöm mindenkinek

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal