[ARG] Funzioni e Comandi Utili
#41
Inviato il 21 agosto 2007 - 16:54
ti chieo l'ultima cosa poi ti lascio in pace ...ho provato ad inserire questo:
public OnPlayerDeath(playerid, killerid, reason)
{
SendDeathMessage(killerid, playerid, reason);
SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
ResetSpawnInfo(playerid);
return 1;
}
ma mi dice :
C:\Documents and Settings\SIMONE\Desktop\tutto samp\my server\pawno\snipersimo.pwn(218) : error 017: undefined symbol "ResetSpawnInfo"
#42
Inviato il 21 agosto 2007 - 17:26
ResetSpawnInfo(playerid)
{
new rand = random(sizeof(gRandomSpawns));
SetSpawnInfo(playerid, 255, 0,
gRandomSpawns[rand][PlayerX],
gRandomSpawns[rand][PlayerY],
gRandomSpawns[rand][PlayerZ],
gRandomSpawns[rand][PlayerAngle],
38, 500, 0, 0, 0, 0);
}
Credo ke nel tuo script non serva, quindi elimina quella riga.
#44
Inviato il 21 agosto 2007 - 21:34
questa è la gm attuale e ci sono due problemi 1 quando un player entra ed esce nn viene scritto join e left, l'altro è che quando ci si spara i colpi passano attraverso e ci si puo ammazzare solo sgozzandosi con il coltello che ho combinato?
#45
Inviato il 21 agosto 2007 - 21:43
In testa alla GM:
#define COLOR_GREY 0xAFAFAFAA new string[256],name[MAX_PLAYER_NAME];
Nell'OnPlayerConnect:
GetPlayerName(playerid,name,sizeof(name)); format(string,sizeof(string),"%s has joined the server",name); SendClientMessage(playerid,COLOR_GREY,string);
Nell'OnPlayerDisconnect:
new rname[256]; switch(reason) { case 0:rname="TimeOut";case 1;rname="Leaving";case 2:rname="Kicked"; } GetPlayerName(playerid,name,sizeof(name)); format(string,sizeof(string),"%s has left the server (%s)",name,rname); SendClientMessage(playerid,COLOR_GREY,string);
Per l'altra cosa, sostituisci l'AddPlayerClass tuo con il seguente:
AddPlayerClass(285,549.027588, -3809.317139, 5.540080, 34, 999, 33, 999, 4, 1);
#46
Inviato il 21 agosto 2007 - 21:56
questa è la gm :
e questi gli errori ._.
C:\Documents and Settings\SIMONE\Desktop\tutto samp\my server\pawno\snipersimo.pwn(94) : warning 202: number of arguments does not match definition
C:\Documents and Settings\SIMONE\Desktop\tutto samp\my server\pawno\snipersimo.pwn(207) : error 001: expected token: ":", but found ";"
C:\Documents and Settings\SIMONE\Desktop\tutto samp\my server\pawno\snipersimo.pwn(207) : error 036: empty statement
C:\Documents and Settings\SIMONE\Desktop\tutto samp\my server\pawno\snipersimo.pwn(207) : error 029: invalid expression, assumed zero
C:\Documents and Settings\SIMONE\Desktop\tutto samp\my server\pawno\snipersimo.pwn(207) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
#47
Inviato il 21 agosto 2007 - 22:00
case 0:rname="TimeOut";case 1:rname="Leaving";case 2:rname="Kicked";
EDIT: Ah, poi devi mettere l'Angolo di rotazione Z nell'AddPlayerClass... io te l'ho tolto perché era errato, non può mica essere 360...
#48
Inviato il 21 agosto 2007 - 22:06
#49
Inviato il 22 agosto 2007 - 13:10
Quote
ok ora funzia grazi epero devo testare se quando spari ma uno lo becchi o gli passi attraverso
Purtroppo questo problema non son riuscito a risolverlo, questo è l'unico problema che mi viene in mente, che i players stanno sotto il livello del mare, da quanto ho dedotto dal testing di ieri, e che quindi funzionano solo le armi tipo pugni ecc.;, quindi, prova a rispostare gli oggetti un pochino sopra il livello del mare e prova se va.
#50
Inviato il 22 agosto 2007 - 14:48
devo rifare tutta la mappa? ç__ç
#52
Inviato il 22 agosto 2007 - 15:04
#54
Inviato il 22 agosto 2007 - 15:09
io ho questo
#include <a_samp> // Colori #define COLOR_RED 0xAA3333AA #define COLOR_GREY 0xAFAFAFAA #define COLOR_GREEN 0x33AA33AA #define COLOR_YELLOW 0xFFFF00AA #define COLOR_BLUE 0x1111AAFF #define COLOR_PINK 0xFF66FFAA #define COLOR_LIGHTBLUE 0x33CCFFAA #define COLOR_DARKRED 0x660000AA #define COLOR_ORANGE 0xFF9900AA #define COLOR_GREY 0xAFAFAFAA new string[256],name[MAX_PLAYER_NAME]; //spawn a caso enum PlayerSpawnInfo { Float:PlayerX, Float:PlayerY, Float:PlayerZ, Float:PlayerAngle } new Float:gRandomSpawns[][PlayerSpawnInfo] = { {600.1655, -3811.7905, 15.2082, 112.7777}, {646.4140, -3827.2664, 12.4031, 321.1230}, {547.2728, -3849.7695, 13.3681, 102.4143}, {492.6110, -3821.0444, 7.8531, 357.4700}, {488.7010, -3769.9773, 2.7558, 8.4367}, {571.4938, -3714.3582, 9.3525, 74.5508}, {483.6669, -3824.8723, 13.4149, 210.4112} }; // This is a comment // uncomment the line below if you want to write a filterscript //#define FILTERSCRIPT #if defined FILTERSCRIPT public OnFilterScriptInit() { print("\n--------------------------------------"); print(" Blank Filterscript by your name here"); print("--------------------------------------\n"); return 1; } public OnFilterScriptExit() { return 1; } #else main() { print("\n----------------------------------"); print(" Blank Gamemode by your name here"); print("----------------------------------\n"); } #endif public OnGameModeInit() { ShowNameTags(0); ShowPlayerMarkers(0); SetGameModeText("elite sniper mode"); UsePlayerPedAnims(); //peds AddPlayerClass(285,506.3067, -3816.8325, 6.0355, 270.8589, 34, 999, 33, 999, 4, 1); //mappa CreateObject(653, 620.640991, -3831.866699, 9.857434, 0, 0, 0); CreateObject(653, 566.683167, -3854.313965, 10.257373, 0, 0, 0); CreateObject(653, 533.514893, -3839.683594, 10.263591, 0, 0, 0); CreateObject(653, 568.946228, -3779.579590, 11.020112, 0, 0, 0); CreateObject(653, 503.277649, -3810.462646, 11.178607, 0, 0, 0); CreateObject(653, 637.572815, -3861.326660, 9.864930, 0, 0, 0); CreateObject(653, 544.7928, -3793.6089, 5.8694, 0, 0, 0); CreateObject(653, 595.2645, -3790.5542, 5.8770, 0, 0, 0); CreateObject(653, 647.0147, -3784.2141, 2.0496, 0, 0, 0); CreateObject(653, 607.8031, -3844.2942, 4.7143, 0, 0, 0); CreateObject(653, 569.6580, -3839.8855, 5.1143, 0, 0, 0); CreateObject(653, 534.1443, -3843.3167, 5.1205, 0, 0, 0); CreateObject(653, 499.7672, -3769.6750, 2.7558, 0, 0, 0); CreateObject(653, 510.5946, -3800.2231, 6.0355, 0, 0, 0); CreateObject(653, 499.3341, -3828.5398, 6.0355, 0, 0, 0); CreateObject(653, 545.5616, -3836.3071,5.6143, 0, 0, 0); CreateObject(3983, 612.153381, -3843.655273, 5.423725, 0, 0, 0); CreateObject(3983, 568.502136, -3837.614502, 5.431629, 0, 0, 0); CreateObject(3983, 529.670349, -3828.547607, 5.680115, 0, 0, 0); CreateObject(3985, 567.034119, -3783.476074, 3.908241, 0, 0, 0); CreateObject(4186, 567.721558, -3838.407227, 10.645502, 0, 0, 0); CreateObject(5185, 493.829651, -3813.037354, 6.340174, 0, 0, 213.75); CreateObject(5185, 634.499146, -3843.460205, 5.019001, 0, 0, 33.75); CreateObject(4550, 682.371643, -3905.462402, 15.044119, 0, 0, 247.4999); CreateObject(4563, 417.462433, -3828.908203, 79.684723, 0, 0, 0); CreateObject(3615, 490.743225, -3821.444824, 7.223039, 0, 0, 0); CreateObject(633, 499.127533, -3838.912354, 5.629766, 0, 0, 0); CreateObject(633, 516.972961, -3795.996094, 5.629766, 0, 0, 0); CreateObject(635, 505.624573, -3808.425781, 6.009212, 0, 0, 0); CreateObject(635, 511.134918, -3817.977295, 6.009212, 0, 0, 0); CreateObject(635, 497.685669, -3830.593994, 6.009212, 0, 0, 0); CreateObject(633, 485.179260, -3796.290527, 5.637261, 0, 0, 0); CreateObject(633, 478.959503, -3817.806885, 5.629766, 0, 0, 0); CreateObject(633, 470.834534, -3822.414795, 5.629766, 0, 0, 0); CreateObject(633, 473.240509, -3792.367188, 5.637261, 0, 0, 0); CreateObject(633, 475.564240, -3824.490479, 5.629766, 0, 0, 0); CreateObject(633, 513.718567, -3822.924561, 5.629766, 0, 0, 0); CreateObject(633, 571.716125, -3807.377930, 5.471271, 0, 0, 0); CreateObject(633, 548.224487, -3839.527344, 5.208531, 0, 0, 0); CreateObject(633, 578.968018, -3795.890137, 6.306377, 0, 0, 0); CreateObject(633, 541.041870, -3828.379395, 4.943507, 0, 0, 0); CreateObject(633, 514.473206, -3830.893066, 5.629766, 0, 0, 0); CreateObject(637, 526.451416, -3839.951172, 4.058641, 0, 0, 0); CreateObject(637, 629.789917, -3835.179688, 4.075337, 0, 0, 0); CreateObject(637, 635.005798, -3850.027100, 4.082833, 0, 0, 0); CreateObject(637, 612.951660, -3856.189697, 4.075337, 0, 0, 0); CreateObject(637, 622.423157, -3849.128662, 4.075337, 0, 0, 0); CreateObject(637, 614.549866, -3842.462158, 4.075337, 0, 0, 0); CreateObject(637, 597.090088, -3847.720947, 4.475276, 0, 0, 0); CreateObject(637, 564.296814, -3846.109863, 4.475276, 0, 0, 0); CreateObject(637, 570.554016, -3826.167480, 4.475276, 0, 0, 0); CreateObject(637, 535.960876, -3767.859375, 5.238015, 0, 0, 0); CreateObject(637, 574.709290, -3775.873047, 7.039623, 0, 0, 0); CreateObject(637, 563.890198, -3839.197021, 4.475276, 0, 0, 0); CreateObject(3279, 547.159119, -3850.369385, 4.689869, 0, 0, 0); CreateObject(3279, 523.701050, -3799.438721, 5.111103, 0, 0, 0); CreateObject(3279, 513.693176, -3840.322510, 3.861849, 0, 0, 0); CreateObject(3279, 534.757324, -3863.152100, 3.939869, 0, 0, 0); CreateObject(3279, 598.460876, -3857.267090, 4.189869, 0, 0, 0); CreateObject(3866, 519.271423, -3839.208252, 12.874050, 0, 0, 0); CreateObject(3866, 584.478088, -3855.146240, 12.452816, 0, 0, 326.25); CreateObject(3866, 552.774536, -3758.250977, 12.707977, 0, 0, 146.2501); CreateObject(3866, 568.165894, -3819.655762, 11.952816, 0, 0, 33.75); CreateObject(3887, 479.427277, -3812.510498, 13.903942, 0, 0, 168.7501); CreateObject(3887, 626.843445, -3847.059082, 12.590254, 0, 0, 0.0001); CreateObject(11088, 633.588379, -3780.373291, 6.393300, 0, 0, 0); CreateObject(11088, 562.545776, -3713.061279, 13.040039, 0, 0, 0); CreateObject(11088, 505.439056, -3753.265137, 6.443316, 0, 0, 360); CreateObject(11443, 577.755615, -3763.298584, 5.041161, 0, 0, 0); CreateObject(11443, 587.195557, -3793.724121, 5.041618, 0, 0, 270); CreateObject(11443, 558.957642, -3803.111084, 12.119751, 0, 0, 191.25); CreateObject(3887, 575.565063, -3782.076904, 14.692202, 0, 0, 303.75); CreateObject(3887, 639.679321, -3827.095947, 12.582762, 0, 0, 225); CreateObject(3887, 593.978271, -3810.215332, 15.387930, 0, 0, 123.75); } public OnGameModeExit() { return 1; } public OnPlayerRequestClass(playerid, classid) { SetPlayerPos(playerid, 246.8687,1860.0195,14.0840); SetPlayerCameraPos(playerid, 244.3925,1859.3595,14.0840); SetPlayerCameraLookAt(playerid, 246.8687,1860.0195,14.0840); return 1; } public OnPlayerRequestSpawn(playerid) { return 1; } public OnPlayerConnect(playerid) { GetPlayerName(playerid,name,sizeof(name)); format(string,sizeof(string),"%s has joined the server",name); SendClientMessage(playerid,COLOR_GREY,string); return 1; } public OnPlayerDisconnect(playerid, reason) { new rname[256]; switch(reason) { case 0:rname="TimeOut";case 1:rname="Leaving";case 2:rname="Kicked"; } GetPlayerName(playerid,name,sizeof(name)); format(string,sizeof(string),"%s has left the server (%s)",name,rname); SendClientMessage(playerid,COLOR_GREY,string); return 1; } public OnPlayerSpawn(playerid) { new rand = random(sizeof(gRandomSpawns)); SetPlayerPos(playerid,gRandomSpawns[rand][PlayerX] ,gRandomSpawns[rand][PlayerY],gRandomSpawns[rand][ PlayerZ]); SetPlayerFacingAngle(playerid,gRandomSpawns[rand][ PlayerAngle]); SetPlayerHealth(playerid,1); return 1; } public OnPlayerDeath(playerid, killerid, reason) { SendDeathMessage(killerid, playerid, reason); SetPlayerScore(killerid, GetPlayerScore(killerid) + 1); return 1; } public OnVehicleSpawn(vehicleid) { return 1; } public OnVehicleDeath(vehicleid, killerid) { return 1; } public OnPlayerText(playerid, text[]) { return 1; } public OnPlayerPrivmsg(playerid, recieverid, text[]) { return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/icao", cmdtext, true, 10) == 0){ GameTextForPlayer(playerid,"~g~ICAO AMICHO", 5000, 3); return 1; } if (strcmp("/stfu", cmdtext, true, 10) == 0){ GameTextForPlayer(playerid,"~g~STFU NOOB", 5000, 3); return 1; } return 0; } public OnPlayerInfoChange(playerid) { return 1; } public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { return 1; } public OnPlayerExitVehicle(playerid, vehicleid) { return 1; } public OnPlayerStateChange(playerid, newstate, oldstate) { return 1; } public OnPlayerEnterCheckpoint(playerid) { return 1; } public OnPlayerLeaveCheckpoint(playerid) { return 1; } public OnPlayerEnterRaceCheckpoint(playerid) { return 1; } public OnPlayerLeaveRaceCheckpoint(playerid) { return 1; } public OnRconCommand(cmd[]) { return 1; } public OnObjectMoved(objectid) { return 1; } public OnPlayerObjectMoved(playerid, objectid) { return 1; } public OnPlayerPickUpPickup(playerid, pickupid) { return 1; } public OnPlayerSelectedMenuRow(playerid, row) { return 1; } public OnPlayerExitedMenu(playerid) { return 1; }
#56
Inviato il 22 agosto 2007 - 15:28
cmq la gm la ho testata ieri sera con chiarboss e lui ha risolto tutti i problemi tranne quesllo ....
#57
Inviato il 22 agosto 2007 - 19:49
Quote
melo ha gia detto chiarboss ma io nn so scriptare bene e quindi nn ho idea di come si metta
cmq la gm la ho testata ieri sera con chiarboss e lui ha risolto tutti i problemi tranne quesllo ....
Basta che dal server fai /rcon instagib 1 oppure nell'OnGameModeInit metti SendRconCommand("instagib 1");
#58
Inviato il 22 agosto 2007 - 19:52
#59
Inviato il 22 agosto 2007 - 20:03
Quote
chiarboss allora sei sicuro? devo per forza spostare tutta la mappa un po piu in su x risolvere quel problema? ç__ç
Il problema è sicuramente quello.
#60
Inviato il 22 agosto 2007 - 21:08
Cmq vale la pena provare... puo essere ke mi sbaglio