Szerző Téma: CreateVehicle spawnolás  (Megtekintve 1007 alkalommal)

Nem elérhető nyE

  • 1745
    • Profil megtekintése
CreateVehicle spawnolás
« Dátum: 2011. Március 08. - 17:05:39 »
0 Show voters
Hello!
Az a problémám, hogy van két (de lesz több) spawnolási helyem:
 

new ExportVehicles [ ] [ ] =
{
    {1477.5006, 787.8934, 10.5474, 179.3935, \"Blackfield Chapel\"},
    {1523.8258, 932.4841, 10.5474, 357.9766, \"LVA Freight Depot\"}
};

 
Ezzel hogyan lehetne autót szerkeszteni és kiíratni SendClientMessage-el, hogy hol van a kocsi?
Így próbáltam de nem jó:
 

new rand = random(sizeof(ExportVehicles));
ExportVehicle = CreateVehicle(411, ExportVehicles[rand][0], ExportVehicles[rand][1], ExportVehicles[rand][2], ExportVehicles[rand][3],-1,-1,-1);
format(string, 128,\"A jármû lespawnolva %s környékén\", ExportVehicles[rand][4]);
SendClientMessage(playerid, 0x45E01FFF, string);

Nem elérhető Csabesz

  • 7827
    • Profil megtekintése
CreateVehicle spawnolás
« Válasz #1 Dátum: 2011. Március 08. - 17:08:27 »
0 Show voters
Elsõ 3 érték lebegõpontos, ezért
new Float: ExportVehicles [ ] [ ] = 

Nem elérhető nyE

  • 1745
    • Profil megtekintése
CreateVehicle spawnolás
« Válasz #2 Dátum: 2011. Március 08. - 17:17:00 »
0 Show voters
Idézetet írta: IceMan™ date=1299600507\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"6680\" data-ipsquote-contentclass=\"forums_Topic
Elsõ 3 érték lebegõpontos, ezért
new Float: ExportVehicles [ ] [ ] = 

 

Már próbáltam, de úgy is tag mismatch-t ír.

Nem elérhető Csabesz

  • 7827
    • Profil megtekintése
CreateVehicle spawnolás
« Válasz #3 Dátum: 2011. Március 08. - 17:35:15 »
0 Show voters
Igen, mivel a karakterláncnak nincs tárolója.
Tessék,
 

enum eInfo
{
    Float: X,
    Float: Y,
    Float: Z,
    Float: A,
    i_str [ 64 ]
}
new const ExportVehicles [ ] [ eInfo ] =
{
    {1477.5006, 787.8934, 10.5474, 179.3935, \"Blackfield Chapel\"},
    {1523.8258, 932.4841, 10.5474, 357.9766, \"LVA Freight Depot\"}
}
« Utoljára szerkesztve: 2011. Március 08. - 18:53:27 írta IceMan™ »

Nem elérhető kurta999

  • 2759
  • Éllő fédisznó
    • Profil megtekintése
CreateVehicle spawnolás
« Válasz #4 Dátum: 2011. Március 08. - 18:38:06 »
0 Show voters
Ne lopd a stringemet xDD
Amúgy
 

enum eInfo
{
    Float: X,
    Float: Y,
    Float: Z,
    Float: A,
    i_str [ 24 ]
}
new const ExportVehicles [ ] [ eInfo ] =
{
    {1477.5006, 787.8934, 10.5474, 179.3935, {\"Blackfield Chapel\"}},
    {1523.8258, 932.4841, 10.5474, 357.9766, {\"LVA Freight Depot\"}}
}

 
Használata:
 
ExportVehicles [sorID][X]
ExportVehicles [sorID][Y]
ExportVehicles [sorID][Z]
ExportVehicles [sorID][A]
ExportVehicles [sorID][i_str]
« Utoljára szerkesztve: 2011. Március 08. - 18:40:44 írta kurta999 »

Nem elérhető nyE

  • 1745
    • Profil megtekintése
CreateVehicle spawnolás
« Válasz #5 Dátum: 2011. Március 08. - 20:11:00 »
0 Show voters
IceMan leírásából már rájöttem, de azért kösz, hogy gondoltál rám kurta :D
Locked.

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal