if(!strcmp(cmdtext, "/zalba", true))
{
new FilePath[128];
format(FilePath, sizeof(FilePath), "Admin/Zalbe/%s.ini", GetPlayerName(playerid));
SendClientMessageToAll(0xFFFFFFAA, "Netko je napisao /zalba");
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Zalba na bilo sta vezano uz server", "\nUpisite opis zalbe i na sta se zalite nas tim ce pogledati zalbu", "Posalji", "Odustani");
SendClientMessage(playerid,0xFFFFFFAA,"Zalba ce biti poslana admin timu, zahvaljujemo za zalbi...");
return 1;
}
new FilePath[128]; format(FilePath, sizeof(FilePath), "Admin/Korisnici/%s.ini", GetPlayerName(playerid));
format(FilePath, sizeof(FilePath), "Admin/Zalbe/%s.ini", GetPlayerName(playerid));
if(!strcmp(cmdtext, "/zalba", true))
{
new FilePath[128];
new Name[32];
format(FilePath, sizeof(FilePath), "Admin/Zalbe/%s.ini", GetPlayerName(playerid,Name,sizeof(Name)));
SendClientMessageToAll(0xFFFFFFAA, "Netko je napisao /zalba");
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Zalba na bilo sta vezano uz server", "\nUpisite opis zalbe i na sta se zalite nas tim ce pogledati zalbu", "Posalji", "Odustani");
SendClientMessage(playerid,0xFFFFFFAA,"Zalba ce biti poslana admin timu, zahvaljujemo za zalbi...");
return 1;
}
if(!strcmp(cmdtext, "/zalba", true))
{
new Name[MAX_PLAYER_NAME];
GetPlayerName(playerid, Name, sizeof(Name));
new FilePath[128];
format(FilePath, sizeof(FilePath), "Admin/Zalbe/%s.ini", Name);
SendClientMessageToAll(0xFFFFFFAA, "Netko je napisao /zalba");
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Zalba na bilo sta vezano uz server", "\nUpisite opis zalbe i na sta se zalite nas tim ce pogledati zalbu", "Posalji", "Odustani");
SendClientMessage(playerid,0xFFFFFFAA,"Zalba ce biti poslana admin timu, zahvaljujemo za zalbi...");
return 1;
}
stock PlayerName(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
return name;
}
PlayerName(playerid);
|
Originally Posted by Johnson_boy
Код:
if(!strcmp(cmdtext, "/zalba", true))
{
new Name[MAX_PLAYER_NAME];
GetPlayerName(playerid, Name, sizeof(Name));
new FilePath[128];
format(FilePath, sizeof(FilePath), "Admin/Zalbe/%s.ini", Name);
SendClientMessageToAll(0xFFFFFFAA, "Netko je napisao /zalba");
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Zalba na bilo sta vezano uz server", "\nUpisite opis zalbe i na sta se zalite nas tim ce pogledati zalbu", "Posalji", "Odustani");
SendClientMessage(playerid,0xFFFFFFAA,"Zalba ce biti poslana admin timu, zahvaljujemo za zalbi...");
return 1;
}
GetPlayerName can't be used without any variable. So GetPlayerName(playerid); doesnt work. If you need to use GetPlayerName often, i recommend you to use stock like this: Код:
stock PlayerName(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
return name;
}
Код:
PlayerName(playerid); |
can you help me?