if(strcmp(cmdtext, \"/dm\") == 0 ){ ResetPlayerWeapons(playerid); SetPlayerHealth(playerid, 100); SetPlayerArmour(playerid, 100); GivePlayerWeapon(playerid, 4, 1); GivePlayerWeapon(playerid, 9, 1); GivePlayerWeapon(playerid, 16, 1000); GivePlayerWeapon(playerid, 24, 1000); GivePlayerWeapon(playerid, 26, 1000); GivePlayerWeapon(playerid, 28, 1000); GivePlayerWeapon(playerid, 31, 1000); GivePlayerWeapon(playerid, 34, 1000); GivePlayerWeapon(playerid, 45, 1000); GivePlayerWeapon(playerid, 46, 1000); SetPlayerVirtualWorld(playerid, 4731); SetPlayerPos(playerid,2502.9084,2773.9219,10.8203); SendClientMessage(playerid, 0xFFFF00AA,\"Csatlakoztál a DM-hez! Kilépéshez: /exitdm\"); return 1;}
new dmbenvan[MAX_PLAYERS]; public OnPlayerCommandText(playerid, cmdtext[]){if(strcmp(cmdtext, \"/dm\") == 0 ){dmbenvan[playerid] = 1; ResetPlayerWeapons(playerid); SetPlayerHealth(playerid, 100); SetPlayerArmour(playerid, 100); GivePlayerWeapon(playerid, 4, 1); GivePlayerWeapon(playerid, 9, 1); GivePlayerWeapon(playerid, 16, 1000); GivePlayerWeapon(playerid, 24, 1000); GivePlayerWeapon(playerid, 26, 1000); GivePlayerWeapon(playerid, 28, 1000); GivePlayerWeapon(playerid, 31, 1000); GivePlayerWeapon(playerid, 34, 1000); GivePlayerWeapon(playerid, 45, 1000); GivePlayerWeapon(playerid, 46, 1000); SetPlayerVirtualWorld(playerid, 4731); SetPlayerPos(playerid,2502.9084,2773.9219,10.8203); SendClientMessage(playerid, 0xFFFF00AA,\"Csatlakoztál a DM-hez! Kilépéshez: /exitdm\"); return 1;}if(strcmp(cmdtext,\"/exitdm\") == 0 ){if( dmbenvan[playerid] == 1 ){ SendClientMessage(playerid,0xff008cAA,\"Kiléptél a DM zónából!\"); // Többi funkció, amikor kilép a DM zónából!}else if( dmbenvan[playerid] == 0 ){SendClientMessage(playerid,0xff008cAA,\"Jelenleg nem vagy DM zónában!\");}return 1;}return 1;}
Nem mûködik
new dmbenvan[MAX_PLAYERS]; public OnPlayerCommandText(playerid, cmdtext[]){if(strcmp(cmdtext, \"/dm\") == 0 ){dmbenvan[playerid] = 1; ResetPlayerWeapons(playerid); SetPlayerHealth(playerid, 100); SetPlayerArmour(playerid, 100); GivePlayerWeapon(playerid, 4, 1); GivePlayerWeapon(playerid, 9, 1); GivePlayerWeapon(playerid, 16, 1000); GivePlayerWeapon(playerid, 24, 1000); GivePlayerWeapon(playerid, 26, 1000); GivePlayerWeapon(playerid, 28, 1000); GivePlayerWeapon(playerid, 31, 1000); GivePlayerWeapon(playerid, 34, 1000); GivePlayerWeapon(playerid, 45, 1000); GivePlayerWeapon(playerid, 46, 1000); SetPlayerVirtualWorld(playerid, 4731); SetPlayerPos(playerid,2502.9084,2773.9219,10.8203); SendClientMessage(playerid, 0xFFFF00AA,\"Csatlakoztál a DM-hez! Kilépéshez: /exitdm\"); return 1;}if(strcmp(cmdtext,\"/exitdm\") == 0 ){if( dmbenvan[playerid] == 1 ){ SendClientMessage(playerid,0xff008cAA,\"Kiléptél a DM zónából!\"); SpawnPlayer(playerid);}else if( dmbenvan[playerid] == 0 ){SendClientMessage(playerid,0xff008cAA,\"Jelenleg nem vagy DM zónában!\");}return 1;}return 1;}
GivePlayerWeapon(playerid, 28, 1000);
I_Dexter[CL]\" post=\"332122\" timestamp=\"1345737889\"]Megtaláltam a hibát én is ahogy testeltem!Igen, kommenteltem hogy oda rakd amit még szeretnél ahogy kilép a zónából!!Javítottam.Javított változat: new dmbenvan[MAX_PLAYERS]; public OnPlayerCommandText(playerid, cmdtext[]){if(strcmp(cmdtext, \"/dm\") == 0 ){dmbenvan[playerid] = 1; ResetPlayerWeapons(playerid); SetPlayerHealth(playerid, 100); SetPlayerArmour(playerid, 100); GivePlayerWeapon(playerid, 4, 1); GivePlayerWeapon(playerid, 9, 1); GivePlayerWeapon(playerid, 16, 1000); GivePlayerWeapon(playerid, 24, 1000); GivePlayerWeapon(playerid, 26, 1000); GivePlayerWeapon(playerid, 28, 1000); GivePlayerWeapon(playerid, 31, 1000); GivePlayerWeapon(playerid, 34, 1000); GivePlayerWeapon(playerid, 45, 1000); GivePlayerWeapon(playerid, 46, 1000); SetPlayerVirtualWorld(playerid, 4731); SetPlayerPos(playerid,2502.9084,2773.9219,10.8203); SendClientMessage(playerid, 0xFFFF00AA,\"Csatlakoztál a DM-hez! Kilépéshez: /exitdm\"); return 1;}if(strcmp(cmdtext,\"/exitdm\") == 0 ){if( dmbenvan[playerid] == 1 ){ SendClientMessage(playerid,0xff008cAA,\"Kiléptél a DM zónából!\"); SpawnPlayer(playerid);}else if( dmbenvan[playerid] == 0 ){SendClientMessage(playerid,0xff008cAA,\"Jelenleg nem vagy DM zónában!\");}return 1;}return 1;} E: Ez olyan, hogy amikor kilép a DM zónából, akkor lespawnolja a playert!Nyugodtan írhatsz oda a spawnplayer alá mert az az a rész amikor kilép.Pl.: GivePlayerWeapon(playerid, 28, 1000); Akármit.DexterE2: Ha jól raktad be, akkor müködnie kell, mert testeltem!Dexter [megint XD] [/quote]Hozátoldok valamit public OnPlayerSpawn(playerid){if( dmbenvan[playerid] == 1 ){// ide hogy hova tegye ha dmbe van}else{//ide a rendes spawn}return 1;}
public OnPlayerSpawn(playerid){if( dmbenvan[playerid] == 1 ){// ide hogy hova tegye ha dmbe van}else{//ide a rendes spawn}return 1;}
Most sem jó
I_Dexter[CL] link=topic=31203.msg332122#msg332122 date=1345737889]Megtaláltam a hibát én is ahogy testeltem!Igen, kommenteltem hogy oda rakd amit még szeretnél ahogy kilép a zónából!!Javítottam.Javított változat: new dmbenvan[MAX_PLAYERS]; public OnPlayerCommandText(playerid, cmdtext[]){if(strcmp(cmdtext, \"/dm\") == 0 ){dmbenvan[playerid] = 1; ResetPlayerWeapons(playerid); SetPlayerHealth(playerid, 100); SetPlayerArmour(playerid, 100); GivePlayerWeapon(playerid, 4, 1); GivePlayerWeapon(playerid, 9, 1); GivePlayerWeapon(playerid, 16, 1000); GivePlayerWeapon(playerid, 24, 1000); GivePlayerWeapon(playerid, 26, 1000); GivePlayerWeapon(playerid, 28, 1000); GivePlayerWeapon(playerid, 31, 1000); GivePlayerWeapon(playerid, 34, 1000); GivePlayerWeapon(playerid, 45, 1000); GivePlayerWeapon(playerid, 46, 1000); SetPlayerVirtualWorld(playerid, 4731); SetPlayerPos(playerid,2502.9084,2773.9219,10.8203); SendClientMessage(playerid, 0xFFFF00AA,\"Csatlakoztál a DM-hez! Kilépéshez: /exitdm\"); return 1;}if(strcmp(cmdtext,\"/exitdm\") == 0 ){if( dmbenvan[playerid] == 1 ){ SendClientMessage(playerid,0xff008cAA,\"Kiléptél a DM zónából!\"); SpawnPlayer(playerid);}else if( dmbenvan[playerid] == 0 ){SendClientMessage(playerid,0xff008cAA,\"Jelenleg nem vagy DM zónában!\");}return 1;}return 1;} E: Ez olyan, hogy amikor kilép a DM zónából, akkor lespawnolja a playert!Nyugodtan írhatsz oda a spawnplayer alá mert az az a rész amikor kilép.Pl.: GivePlayerWeapon(playerid, 28, 1000); Akármit.DexterE2: Ha jól raktad be, akkor müködnie kell, mert testeltem!Dexter [megint XD] [/quote]Hozátoldok valamit public OnPlayerSpawn(playerid){if( dmbenvan[playerid] == 1 ){// ide hogy hova tegye ha dmbe van}else{//ide a rendes spawn}return 1;} [/quote]Ez meg felesleges mert benne van az exitdm -be...