styllek Opublikowano Czerwiec 27, 2017 o 22:23 Udostępnij Opublikowano Czerwiec 27, 2017 o 22:23 Yo, zrobiłem klase, aczkolwiek problem jest z kompilacją, gdyż wywaliło dość dużo errorów, pomoże ktoś i powie, na co patrzyć aby korygować takie błędy przy następnych kompilacjach? ;]] z góry dzięki: Błędy: coditem_islamista_p.sp(46) : error 017: undefined symbol "sprite_beam" coditem_islamista_p.sp(47) : error 017: undefined symbol "sprite_halo" coditem_islamista_p.sp(56) : warning 215: expression has no effect coditem_islamista_p.sp(62) : warning 225: unreachable code coditem_islamista_p.sp(62) : error 017: undefined symbol "weapons2" coditem_islamista_p.sp(64) : error 017: undefined symbol "wartosc_itemu" coditem_islamista_p.sp(64) : warning 215: expression has no effect coditem_islamista_p.sp(64) : error 001: expected token: ";", but found "]" coditem_islamista_p.sp(64) : error 029: invalid expression, assumed zero coditem_islamista_p.sp(64) : fatal error 190: too many error messages on one line Cała klasa: #include <sourcemod> #include <sdkhooks> #include <sdktools> #include <codmod> new const String:nazwa[] = "[PREMIUM] Islamista"; new const String:opis[] = "Posiada strój wroga, +7DMG z AK47, po smierci wybucha zabijając pobliskich wrogów"; new const String:bronie[] = "#weapon_ak47#"; new const inteligencja = 10; new const zdrowie = 20; new const obrazenia = 7; new const wytrzymalosc = 30; new const kondycja = 40; new String:modele_postaci[][] = { "models/player/ctm_fbi.mdl", "models/player/ctm_gign.mdl", "models/player/ctm_gsg9.mdl", "models/player/ctm_sas.mdl", "models/player/ctm_st6.mdl", "models/player/tm_anarchist.mdl", "models/player/tm_phoenix.mdl", "models/player/tm_pirate.mdl", "models/player/tm_balkan_variantA.mdl", "models/player/tm_leet_variantA.mdl" }; new sprite_explosion; new bool:ma_klase[65]; public Plugin:myinfo = { name = nazwa, author = "Linux`", description = "Cod Item", version = "1.0", url = "http://steamcommunity.com/id/linux2006" }; public OnPluginStart() { cod_register_class(nazwa, opis, bronie, inteligencja, zdrowie, obrazenia, wytrzymalosc, kondycja); HookEvent("player_death", SmiercGracza); HookEvent("player_spawn", OdrodzenieGracza); } public OnMapStart() { sprite_explosion = PrecacheModel("materials/sprites/blueflare1.vmt"); PrecacheSound("weapons/hegrenade/explode5.wav"); for(new i = 0; i < sizeof(modele_postaci); i ++) PrecacheModel(modele_postaci[i]); sprite_beam = PrecacheModel("sprites/laserbeam.vmt"); sprite_halo = PrecacheModel("sprites/glow01.vmt"); } public cod_class_enabled(client) { ma_klase[client] = true; if(GetUserFlagBits(client) & ADMFLAG_CUSTOM3) { cod_class_enabled return COD_CONTINUE; } PrintToChat(client, "[FastGamers.pl] Nie masz dostepu do tej klasy Premium "); return COD_STOP; cod_set_user_bonus_weapons(client, weapons2); ma_klase[client] = true; wartosc_itemu[client] = wartosc; if(IsPlayerAlive(client)) SetEntityModel(client, (GetClientTeam(client) == CS_TEAM_T)? modele_postaci[GetRandomInt(0, 4)]: modele_postaci[GetRandomInt(5, 9)]); } public cod_class_disabled(client) { ma_klase[client] = false; cod_set_user_bonus_weapons(client, weapons); ma_klase[client] = false; if(IsPlayerAlive(client)) CS_UpdateClientModel(client); } public Action:SmiercGracza(Handle:event, String:name[], bool:dontbroadcast) { new client = GetClientOfUserId(GetEventInt(event, "userid")); new killer = GetClientOfUserId(GetEventInt(event, "attacker")); if(!IsValidClient(client) || !ma_klase[client]) return Plugin_Continue; if(!IsValidClient(killer) || GetClientTeam(client) == GetClientTeam(killer)) return Plugin_Continue; new Float:forigin[3], Float:iorigin[3]; GetClientEyePosition(client, forigin); for(new i = 1; i <= MaxClients; i++) { if(!IsClientInGame(i) || !IsPlayerAlive(i)) continue; if(GetClientTeam(client) == GetClientTeam(i)) continue; GetClientEyePosition(i, iorigin); if(GetVectorDistance(forigin, iorigin) <= 100.0) cod_inflict_damage(i, client, GetClientHealth(i)+1); } EmitSoundToAll("weapons/hegrenade/explode5.wav", client, SNDCHAN_AUTO, SNDLEVEL_GUNFIRE); TE_SetupExplosion(forigin, sprite_explosion, 10.0, 1, 0, 100, 100); TE_SendToAll(); return Plugin_Continue; } public Action:OdrodzenieGracza(Handle:event, String:name[], bool:dontBroadcast) { new client = GetClientOfUserId(GetEventInt(event, "userid")); if(!IsValidClient(client) || !ma_klase[client]) return Plugin_Continue; SetEntityModel(client, (GetClientTeam(client) == CS_TEAM_T)? modele_postaci[GetRandomInt(0, 4)]: modele_postaci[GetRandomInt(5, 9)]); return Plugin_Continue; } Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
styllek Opublikowano Czerwiec 28, 2017 o 00:42 Autor Udostępnij Opublikowano Czerwiec 28, 2017 o 00:42 Zaloguj się lub zarejestruj aby zobaczyć zawartość. Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
owner_2019 Opublikowano Listopad 23, 2019 o 09:57 Udostępnij Opublikowano Listopad 23, 2019 o 09:57 Zaloguj się lub zarejestruj aby zobaczyć zawartość. Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
Rekomendowane odpowiedzi