-
Postów
4 -
Dołączył
-
Ostatnia wizyta
Odpowiedzi opublikowane przez Maxgameee
-
-
Napisałem kod ustawiający hp i się nie kompiluje:
#include <sourcemod>
#pragma semicolon 1
public void OnPluginStart()
{
RegConsoleCmd("sm_hp", hp);
}
Public Action hp(int client,int args)
{
int GetClientHealth(client);
if (hp < 30)
{
SetEntityHealth(client,100);
}
else
{
SetEntityHealth(client,1);
PrintToChat(client,"(cenzura) ci w matule.");
PrintToChat(client,"(cenzura) sie beaka z cb");
}
return Plugin_Handled;
}
-
Dziena ❤️
- 1
-
Napisałem prosty kod na info o graczu:
#include <sourcemod>
#pragma semicolon 1
char steamidbuffer[64];
GetClientAuthId(client,AuthId_Steam2,steamidbuffer,sizeof(steamidbuffer));
public void OnPluginStart()
{
RegConsoleCmd("sm_info", MojeDane, "Wyświetal informacje o graczu");
}
public Action MojeDane(int client, int args)
{
PrintToChat(client, "Informacje o Tobie:");
//nick
PrintToChat(client, "Twój nick to %N", client);
//steamid
PrintToChat(client,"Towje SteamID to: %s", steamidbuffer);
return Plugin_Handled;
}
I gdy go kompiluje dostaje taki błąd:
To mój pierwszy skrypt w sm i nie wiem co mogę z tym zrobić
Kod się nie kompiluje
w Problem z kodem
Opublikowano
Nie wiem o co chodzi
#include <sourcemod>
#pragma semicolon 1
public void OnPluginStart(){
HookEvent("player_death", OnPlayerDeath,EventHookMode_Pre);
}
public Action OnPlayerDeath(Event event,const char[] name,bool dontBroadcast) {
int clientUserId = event.GetInt("userid");
int client = GetClientOfUserId(clientUserId);
PrintToChat("Wywalił sie: %N", client);
return Plugin_Handled;
}
Ps:kolor rzeby oszczędzić liczenia
Zrobione
nieważne