Skripta koju koristim: FS
Detaljan opis problema: Želim da spremim, evo imam komandu kick i hoću da sada kad se ukuca komanda da liku spremi u ini file razlog zbog kojeg je dobio kick
Dio skripte:
Neke slike/video za lakse dobivanje pomoci(neobavezno):
CMD:st(playerid, params[])
{
if(PlayerInfo >= 3) {
new PID; //define the playerid we wanna kick
new reason; //the reason, put into a string
new str; //a new message string
new str11; //a new message string
new Playername, Adminname; //defines the function with the playername we wanna get
GetPlayerName(playerid, Adminname, sizeof(Adminname)); //defines the function with the adminname we wanna get
GetPlayerName(PID, Playername, sizeof(Playername));
if(sscanf(params, "us", PID,reason)) return SendClientMessage(playerid, 0, "USAGE: /kick "); //tell sscanf if the parameters/the syntax is written wrong to return a message (PID and the reason used here)
if(!IsPlayerConnected(PID)) // if the ID is wrong or not connected, return a message! (PID used here)
return SendClientMessage(playerid, 0, "Player is not connected!");
format(str, sizeof(str), "'%s' has been kicked by administrator '%s'. Reason: %s ", Playername, Adminname, reason); //format the string we've defined to send the message, playername and adminname are used to receive the information about the names
SendClientMessageToAll(0, str); //send that message to all
Kick(PID); //kick the playerid we've defined
}
else //if he has not got the permissions
{
SendClientMessage(playerid, 0, "You have to be level 3 to use that command!"); //return this message
}
return 1;
}
Imam enume i sve, samo mi objasnite kako da snimim taj string, pokušao sam dodati ispod KICK(pid)
PlayerInfo = reason
Ali kaže array must be indexed nešto tako.