Jump to content
  • 0

Ajail command


Alexandr69

Question

Problema intalnita (descriere): Nu stiu care este problema... 
Ero(area / rile) / warning-(ul / urile):
Liniile de cod / sursa / script-ul(obligatoriu):  error 076: syntax error in the expression, or invalid function call 

warning 202: number of arguments does not match definition

 

pentru GetPlayerName(playerid,adminname);
        GetPlayerName(targetid,playername);

CMD:ajail(playerid, params[])
{
	if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,"ERROR: Only administrators may use this!");
	new targetid, time, string[128], playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME];
	if(sscanf(params,"ui",targetid,time)) return SendClientMessage(playerid,-1,"USAGE: /ajail (playerid) (minutes)");
	if(time == 0) return SendClientMessage(playerid,-1,"ERROR: You must prison the player for at least 1 minute.");
	{
		SetPlayerPos(targetid,197.5662, 175.4800, 1004.0); 
		SetPlayerInterior(targetid,3); 
		SetPlayerVirtualWorld(targetid,30);
		PrisonTime[targetid] = time;
		GetPlayerName(playerid,adminname);
		GetPlayerName(targetid,playername);
		format(string,sizeof(string),"%s has jailed %s for %i minutes.",adminname,playername,time);
		SendClientMessageToAll(0xAA3333AA,string);
	}
	return 1;
}


Imagini / Video (optional):
Ati incercat sa rezolvati singur?: Da. 

Edited by Alexandr69
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0
  • 0
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.