Szerző Téma: Sajat script gond!  (Megtekintve 782 alkalommal)

Sajat script gond!
« Dátum: 2012. június 19. - 15:28:58 »
0 Show voters
Hello.Keszitettem egy gumiinfo scriptet, ami a gamemodeomban kivalloan mukodik,viszont ha egy scriptbe akarom rakni,hogy ide is feltehessem sajnos nem mukodik.Valaki tudna segiteni?
A script itt van:
 

#include <a_samp>
#define CAR 0
#define BIKE 1
#define MOTORBIKE 2
#define BOAT 3
#define PLANE 4
#define RC 5
#define TRAIN 6
#define TRAILER 7
#define HELICOPTER 8
#define JATEKOSOK 100
new panels, doors, lights, tires;
forward GumiCheck();
new Text:kocsialap[MAX_PLAYERS];
new Text:motoralap[MAX_PLAYERS];
new Text:elsokerek[MAX_PLAYERS];
new Text:hatsokerek[MAX_PLAYERS];
new Text:balelso[MAX_PLAYERS];
new Text:jobbelso[MAX_PLAYERS];
new Text:jobbhatso[MAX_PLAYERS];
new Text:balhatso[MAX_PLAYERS];
public OnFilterScriptInit()
{
print(\"SGumiInfo by SkillZ Aktiv\");
 
return 1;
}
public OnFilterScriptExit()
{
SetTimer(\"GumiCheck\", 1000, 1);
    for(new i=0; i<JATEKOSOK; i++) {
kocsialap = TextDrawCreate(225.000000, 407.000000, \"LD_OTB2:butnB\");
TextDrawBackgroundColor(kocsialap, 255);
TextDrawFont(kocsialap, 4);
TextDrawLetterSize(kocsialap, 0.500000, 1.000000);
TextDrawColor(kocsialap, -1);
TextDrawSetOutline(kocsialap, 0);
TextDrawSetProportional(kocsialap, 1);
TextDrawSetShadow(kocsialap, 1);
TextDrawUseBox(kocsialap, 1);
TextDrawBoxColor(kocsialap, 255);
TextDrawTextSize(kocsialap, 25.000000, 76.000000);
motoralap = TextDrawCreate(232.000000, 407.000000, \"LD_OTB2:butnB\");
TextDrawBackgroundColor(motoralap, 255);
TextDrawFont(motoralap, 4);
TextDrawLetterSize(motoralap, 0.500000, 1.000000);
TextDrawColor(motoralap, -1);
TextDrawSetOutline(motoralap, 0);
TextDrawSetProportional(motoralap, 1);
TextDrawSetShadow(motoralap, 1);
TextDrawUseBox(motoralap, 1);
TextDrawBoxColor(motoralap, 255);
TextDrawTextSize(motoralap, 10.000000, 76.000000);
balelso = TextDrawCreate(221.000000, 411.000000, \"LD_BEAT:circle\");
TextDrawBackgroundColor(balelso, 255);
TextDrawFont(balelso, 4);
TextDrawLetterSize(balelso, 0.500000, 1.000000);
TextDrawColor(balelso, -1);
TextDrawSetOutline(balelso, 0);
TextDrawSetProportional(balelso, 1);
TextDrawSetShadow(balelso, 1);
TextDrawUseBox(balelso, 1);
TextDrawBoxColor(balelso, 255);
TextDrawTextSize(balelso, 12.000000, 10.000000);
jobbelso = TextDrawCreate(242.000000, 411.000000, \"LD_BEAT:circle\");
TextDrawBackgroundColor(jobbelso, 255);
TextDrawFont(jobbelso, 4);
TextDrawLetterSize(jobbelso, 0.500000, 1.000000);
TextDrawColor(jobbelso, -1);
TextDrawSetOutline(jobbelso, 0);
TextDrawSetProportional(jobbelso, 1);
TextDrawSetShadow(jobbelso, 1);
TextDrawUseBox(jobbelso, 1);
TextDrawBoxColor(jobbelso, 255);
TextDrawTextSize(jobbelso, 12.000000, 10.000000);
jobbhatso = TextDrawCreate(242.000000, 434.000000, \"LD_BEAT:circle\");
TextDrawBackgroundColor(jobbhatso, 255);
TextDrawFont(jobbhatso, 4);
TextDrawLetterSize(jobbhatso, 0.500000, 1.000000);
TextDrawColor(jobbhatso, -1);
TextDrawSetOutline(jobbhatso, 0);
TextDrawSetProportional(jobbhatso, 1);
TextDrawSetShadow(jobbhatso, 1);
TextDrawUseBox(jobbhatso, 1);
TextDrawBoxColor(jobbhatso, 255);
TextDrawTextSize(jobbhatso, 12.000000, 10.000000);
balhatso = TextDrawCreate(220.000000, 434.000000, \"LD_BEAT:circle\");
TextDrawBackgroundColor(balhatso, 255);
TextDrawFont(balhatso, 4);
TextDrawLetterSize(balhatso, 0.500000, 1.000000);
TextDrawColor(balhatso, -1);
TextDrawSetOutline(balhatso, 0);
TextDrawSetProportional(balhatso, 1);
TextDrawSetShadow(balhatso, 1);
TextDrawUseBox(balhatso, 1);
TextDrawBoxColor(balhatso, 255);
TextDrawTextSize(balhatso, 12.000000, 10.000000);
elsokerek = TextDrawCreate(231.000000, 408.000000, \"LD_BEAT:circle\");
TextDrawBackgroundColor(elsokerek, 255);
TextDrawFont(elsokerek, 4);
TextDrawLetterSize(elsokerek, 0.500000, 1.000000);
TextDrawColor(elsokerek, -1);
TextDrawSetOutline(elsokerek, 0);
TextDrawSetProportional(elsokerek, 1);
TextDrawSetShadow(elsokerek, 1);
TextDrawUseBox(elsokerek, 1);
TextDrawBoxColor(elsokerek, 255);
TextDrawTextSize(elsokerek, 12.000000, 10.000000);
hatsokerek = TextDrawCreate(231.000000, 438.000000, \"LD_BEAT:circle\");
TextDrawBackgroundColor(hatsokerek, 255);
TextDrawFont(hatsokerek, 4);
TextDrawLetterSize(hatsokerek, 0.500000, 1.000000);
TextDrawColor(hatsokerek, -1);
TextDrawSetOutline(hatsokerek, 0);
TextDrawSetProportional(hatsokerek, 1);
TextDrawSetShadow(hatsokerek, 1);
TextDrawUseBox(hatsokerek, 1);
TextDrawBoxColor(hatsokerek, 255);
TextDrawTextSize(hatsokerek, 12.000000, 10.000000);
}
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
return 1;
}
public OnPlayerConnect(playerid)
{
   
return 1;
}
 
public GumiCheck()
{
    for(new i=0; i<JATEKOSOK; i++) {
    GetVehicleDamageStatus(GetPlayerVehicleID(i),panels,doors,lights,tires);
if(IsPlayerInAnyVehicle(i)) {
if(GetVehicleType(GetPlayerVehicleID(i)) == CAR) {
TextDrawShowForPlayer(i, kocsialap);
TextDrawShowForPlayer(i, balelso);
TextDrawShowForPlayer(i, jobbelso);
TextDrawShowForPlayer(i, jobbhatso);
TextDrawShowForPlayer(i, balhatso);
if(tires == 0) {
TextDrawSetString(balelso, \"LD_BEAT:circle\");
TextDrawSetString(jobbelso, \"LD_BEAT:circle\");
TextDrawSetString(balhatso, \"LD_BEAT:circle\");
TextDrawSetString(jobbhatso, \"LD_BEAT:circle\");
} else if(tires == 1) {
TextDrawSetString(balelso, \"LD_BEAT:circle\");
TextDrawSetString(jobbelso, \"LD_BEAT:circle\");
TextDrawSetString(balhatso, \"LD_BEAT:circle\");
TextDrawSetString(jobbhatso, \"LD_BEAT:cross\");
} else if(tires == 2) {
TextDrawSetString(balelso, \"LD_BEAT:circle\");
TextDrawSetString(jobbelso, \"LD_BEAT:cross\");
TextDrawSetString(balhatso, \"LD_BEAT:circle\");
TextDrawSetString(jobbhatso, \"LD_BEAT:circle\");
} else if(tires == 3) {
TextDrawSetString(balelso, \"LD_BEAT:circle\");
TextDrawSetString(jobbelso, \"LD_BEAT:cross\");
TextDrawSetString(balhatso, \"LD_BEAT:circle\");
TextDrawSetString(jobbhatso, \"LD_BEAT:cross\");
} else if(tires == 4) {
TextDrawSetString(balelso, \"LD_BEAT:circle\");
TextDrawSetString(jobbelso, \"LD_BEAT:circle\");
TextDrawSetString(balhatso, \"LD_BEAT:cross\");
TextDrawSetString(jobbhatso, \"LD_BEAT:circle\");
} else if(tires == 5) {
TextDrawSetString(balelso, \"LD_BEAT:circle\");
TextDrawSetString(jobbelso, \"LD_BEAT:cross\");
TextDrawSetString(balhatso, \"LD_BEAT:circle\");
TextDrawSetString(jobbhatso, \"LD_BEAT:circle\");
} else if(tires == 6) {
TextDrawSetString(balelso, \"LD_BEAT:circle\");
TextDrawSetString(jobbelso, \"LD_BEAT:circle\");
TextDrawSetString(balhatso, \"LD_BEAT:cross\");
TextDrawSetString(jobbhatso, \"LD_BEAT:cross\");
} else if(tires == 7) {
TextDrawSetString(balelso, \"LD_BEAT:circle\");
TextDrawSetString(jobbelso, \"LD_BEAT:cross\");
TextDrawSetString(balhatso, \"LD_BEAT:cross\");
TextDrawSetString(jobbhatso, \"LD_BEAT:cross\");
} else if(tires == 8) {
TextDrawSetString(balelso, \"LD_BEAT:cross\");
TextDrawSetString(jobbelso, \"LD_BEAT:circle\");
TextDrawSetString(balhatso, \"LD_BEAT:circle\");
TextDrawSetString(jobbhatso, \"LD_BEAT:circle\");
} else if(tires == 9) {
TextDrawSetString(balelso, \"LD_BEAT:cross\");
TextDrawSetString(jobbelso, \"LD_BEAT:circle\");
TextDrawSetString(balhatso, \"LD_BEAT:circle\");
TextDrawSetString(jobbhatso, \"LD_BEAT:cross\");
} else if(tires == 10) {
TextDrawSetString(balelso, \"LD_BEAT:cross\");
TextDrawSetString(jobbelso, \"LD_BEAT:cross\");
TextDrawSetString(balhatso, \"LD_BEAT:circle\");
TextDrawSetString(jobbhatso, \"LD_BEAT:circle\");
} else if(tires == 11) {
TextDrawSetString(balelso, \"LD_BEAT:cross\");
TextDrawSetString(jobbelso, \"LD_BEAT:cross\");
TextDrawSetString(balhatso, \"LD_BEAT:circle\");
TextDrawSetString(jobbhatso, \"LD_BEAT:cross\");
} else if(tires == 12) {
TextDrawSetString(balelso, \"LD_BEAT:cross\");
TextDrawSetString(jobbelso, \"LD_BEAT:circle\");
TextDrawSetString(balhatso, \"LD_BEAT:cross\");
TextDrawSetString(jobbhatso, \"LD_BEAT:circle\");
} else if(tires == 13) {
TextDrawSetString(balelso, \"LD_BEAT:cross\");
TextDrawSetString(jobbelso, \"LD_BEAT:circle\");
TextDrawSetString(balhatso, \"LD_BEAT:cross\");
TextDrawSetString(jobbhatso, \"LD_BEAT:cross\");
} else if(tires == 14) {
TextDrawSetString(balelso, \"LD_BEAT:circle\");
TextDrawSetString(jobbelso, \"LD_BEAT:circle\");
TextDrawSetString(balhatso, \"LD_BEAT:circle\");
TextDrawSetString(jobbhatso, \"LD_BEAT:cross\");
} else if(tires == 15) {
TextDrawSetString(balelso, \"LD_BEAT:cross\");
TextDrawSetString(jobbelso, \"LD_BEAT:cross\");
TextDrawSetString(balhatso, \"LD_BEAT:cross\");
TextDrawSetString(jobbhatso, \"LD_BEAT:cross\");
}
} else if(GetVehicleType(GetPlayerVehicleID(i)) == MOTORBIKE || GetVehicleType(GetPlayerVehicleID(i)) == BIKE) {
TextDrawShowForPlayer(i, motoralap);
TextDrawShowForPlayer(i, elsokerek);
TextDrawShowForPlayer(i, hatsokerek);
} else if(GetVehicleType(GetPlayerVehicleID(i)) == BOAT || GetVehicleType(GetPlayerVehicleID(i)) == PLANE || GetVehicleType(GetPlayerVehicleID(i)) == RC || GetVehicleType(GetPlayerVehicleID(i)) == TRAIN || GetVehicleType(GetPlayerVehicleID(i)) == HELICOPTER) {
TextDrawHideForPlayer(i, kocsialap);
TextDrawHideForPlayer(i, motoralap);
TextDrawHideForPlayer(i, elsokerek);
TextDrawHideForPlayer(i, hatsokerek);
TextDrawHideForPlayer(i, balelso);
TextDrawHideForPlayer(i, jobbelso);
TextDrawHideForPlayer(i, jobbhatso);
TextDrawHideForPlayer(i, balhatso);
}
}
if(!IsPlayerInAnyVehicle(i)){
 
TextDrawHideForPlayer(i, kocsialap);
TextDrawHideForPlayer(i, motoralap);
TextDrawHideForPlayer(i, elsokerek);
TextDrawHideForPlayer(i, hatsokerek);
TextDrawHideForPlayer(i, balelso);
TextDrawHideForPlayer(i, jobbelso);
TextDrawHideForPlayer(i, jobbhatso);
TextDrawHideForPlayer(i, balhatso);
}
}
return 1;
}
stock GetVehicleType(vehicleid)
{
switch(GetVehicleModel(vehicleid))
{
case 400 .. 416, 418 .. 424, 426 .. 429, 431 .. 434, 436 .. 440, 442 .. 445, 451, 455 .. 459, 466, 467, 470, 471, 474, 475, 477 .. 480, 482, 483, 485, 486, 489 .. 492, 494 .. 496, 498 .. 500, 502 .. 508, 514 .. 518, 524 .. 536, 539 .. 547, 549 .. 552, 554 .. 562, 565 .. 568, 571 .. 576, 578 .. 580, 582, 583, 585, 587 .. 589, 596 .. 605, 609: return CAR;
case 481, 509, 510: return BIKE;
case 448, 461 .. 463, 468, 521 .. 523, 581, 586: return MOTORBIKE;
case 430, 446, 452 .. 454, 472, 473, 484, 493, 595: return BOAT;
case 460, 476, 511 .. 513, 519, 520, 553, 577, 592, 593: return PLANE;
case 441, 464, 465, 501, 564, 594: return RC;
case 449, 537, 538, 569, 570, 590: return TRAIN;
case 435, 450, 584, 591, 606 .. 608, 610, 611: return TRAILER;
case 417, 425, 447, 469, 487, 488, 497, 548, 563: return HELICOPTER;
}
return -1;
}

 
A GetVehicleModel-es cuccot mas scriptbol szedtem.
« Utoljára szerkesztve: 2012. június 19. - 15:37:39 írta xSkillZ7x »

Sajat script gond!
« Válasz #1 Dátum: 2012. június 19. - 15:32:36 »
0 Show voters
OnFilterScriptExit mikor nem használod tovább filterscriptet, /rcon unloadfs <name> akkor hívódik meg.
Rossz helyen van ami alatta van.
Tedd Az OnFilterScriptInit() alá, hogy szerver indításkor elinduljon az idõzítõd (SetTimer(..) , és a textdrawokat is oda tedd hogy létrehozásra kerüljenek a filterscript betöltésekor.

Sajat script gond!
« Válasz #2 Dátum: 2012. június 19. - 15:34:55 »
0 Show voters
Juu,tenleg.:P Most vettem eszre en is xD.Figyelmetlen voltam :)).Kossz szepen

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal