Jump to content

Recommended Posts

Posted

Salut,iar eu :))

Ma puteti ajuta cu comanda /crash? gen vreau sa fie [CMD:crash(playerid, params[]) etc ] :) 

Multumesc anticipat!

    if(strcmp(cmd"/crash"true) == 0
        { 
        if(
IsPlayerConnected(playerid)) 
        { 
        
tmp strtok(cmdtextidx); 
        if(!
strlen(tmp)) 
        { 
        
SendClientMessage(playeridCOLOR_GRAD2"SYNTAX: /crash [playerid/PartOfName]"); 
        return 
1
        } 
        
giveplayerid ReturnUser(tmp); 
        
GetPlayerName(giveplayeridgiveplayersizeof(giveplayer)); 
        if (
PlayerInfo[playerid][pAdmin] >= 5
        { 
        if(
IsPlayerConnected(giveplayerid)) 
        { 
            if(
giveplayerid != INVALID_PLAYER_ID
            { 
                if(
giveplayerid != playerid && Untouchable[giveplayerid]) return SendClientMessage(playeridCOLOR_GREY"* You Can't Do this on This player!"); 
                
GameTextForPlayer(giveplayerid"•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/"10000); 
                
GameTextForPlayer(giveplayerid"•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/"20001); 
                
GameTextForPlayer(giveplayerid"•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/"30002); 
                
GameTextForPlayer(giveplayerid"•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/"40003); 
                
GameTextForPlayer(giveplayerid"•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/"50004); 
                
GameTextForPlayer(giveplayerid"•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/"60005); 
                
GameTextForPlayer(giveplayerid"•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/"70006); 
                
format(stringsizeof(string), "You have crashed %s (%d)'s game"giveplayer,giveplayerid); 
                  
SendClientMessage(playerid,COLOR_DBLUEstring); 
                return 
1
            } 
            else 
            { 
                
format(stringsizeof(string), "** Not Authorised!"giveplayerid); 
                
SendClientMessage(playeridCOLOR_GRAD1string); 
            } 
        } 
        } 
        else 
        { 
        
format(stringsizeof(string), "** You are not Authorised to Use this Command!"giveplayerid); 
        
SendClientMessage(playeridCOLOR_GRAD1string); 
        } 
        } 
        return 
1
 

        }  

 

Posted (edited)
CMD:crash(playerid, params[])
{
	new giveplayerid, giveplayer[25];
	if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, -1, "Synthax: /crash [playerid/part of his name]");
	GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); 
	if (PlayerInfo[playerid][pAdmin] >= 5) 
	{ 
		if(IsPlayerConnected(giveplayerid)) 
		{ 
			if(giveplayerid != INVALID_PLAYER_ID) 
			{ 
				if(giveplayerid != playerid && Untouchable[giveplayerid]) return SendClientMessage(playerid, COLOR_GREY, "* You Can't Do this on This player!"); 
				GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 1000, 0); 
				GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 2000, 1); 
				GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 3000, 2); 
				GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 4000, 3); 
				GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 5000, 4); 
				GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 6000, 5); 
				GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 7000, 6); 
				format(string, sizeof(string), "You have crashed %s (%d)'s game", giveplayer,giveplayerid); 
				SendClientMessage(playerid,COLOR_DBLUE, string); 
				return 1; 
			} 
			else 
			{ 
				format(string, sizeof(string), "** Not Authorised!", giveplayerid); 
				SendClientMessage(playerid, COLOR_GRAD1, string); 
			} 
		} 
	} 
	else 
	{ 
		format(string, sizeof(string), "** You are not Authorised to Use this Command!", giveplayerid); 
		SendClientMessage(playerid, COLOR_GRAD1, string); 
	} 
	return 1; 
}

Sa stii ca e o mare prostie ce ai tu in comanda asta, folosesti format pentru un mesaj pentru care nu ai nevoie sa folosesti, ai 15 linii in plus, uite asa trebuia sa arate comanda:

CMD:crash(playerid, params[])
{
	new giveplayerid, giveplayer[25];
	if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, -1, "Synthax: /crash [playerid/part of his name]");
	{	
		if (PlayerInfo[playerid][pAdmin] >= 5) else return SendClientMessage(playerid, COLOR_GRAD1, "** You are not Authorised to Use this Command!"); 
		if(giveplayerid != INVALID_PLAYER_ID) else return SendClientMessage(playerid, COLOR_GRAD1, "** Not Authorised!"); 
		if(giveplayerid != playerid && Untouchable[giveplayerid] == 1) return SendClientMessage(playerid, COLOR_GREY, "* You Can't Do this on This player!"); 
		GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
		GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 1000, 0); 
		GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 2000, 1); 
		GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 3000, 2); 
		GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 4000, 3); 
		GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 5000, 4); 
		GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 6000, 5); 
		GameTextForPlayer(giveplayerid, "•¤¶§!$$%&'()*+,-./01~!@#$^&*()_-+={[}]:;'<,>.?/", 7000, 6); 
		format(string, sizeof(string), "You have crashed %s (%d)'s game", giveplayer,giveplayerid); 
		SendClientMessage(playerid,COLOR_DBLUE, string); 
	}
	return 1; 
}
Edited by Un4m3d_Hokage
Posted

 

 

Sa stii ca e o mare prostie ce ai tu in comanda asta, folosesti format pentru un mesaj pentru care nu ai nevoie sa folosesti, ai 15 linii in plus, uite asa trebuia sa arate comanda:
 

Da,stiam asta,doar ca am luat-o ca model de pe un alt site,era cam nasoala :)

  • 2 years later...
Posted

 

D:\gamemode\gamemodes\rpg.pwn(18246) : error 001: expected token: ";", but found "]"
D:\gamemode\gamemodes\rpg.pwn(18246) : error 029: invalid expression, assumed zero
D:\gamemode\gamemodes\rpg.pwn(18246) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
[Finished in 40.0s with exit code 1]
[cmd: ['pawncc.exe', '-i includes', 'D:\\gamemode\\gamemodes\\rpg.pwn', '-;+']]
[dir: D:\gamemode\gamemodes]
[path: C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\WINDOWS\System32\OpenSSH\;C:\Users\gagiu\AppData\Local\Microsoft\WindowsApps;]

 

Posted
On 3/22/2021 at 2:46 AM, NoCodAdv said:

 

D:\gamemode\gamemodes\rpg.pwn(18246) : error 001: expected token: ";", but found "]"
D:\gamemode\gamemodes\rpg.pwn(18246) : error 029: invalid expression, assumed zero
D:\gamemode\gamemodes\rpg.pwn(18246) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
[Finished in 40.0s with exit code 1]
[cmd: ['pawncc.exe', '-i includes', 'D:\\gamemode\\gamemodes\\rpg.pwn', '-;+']]
[dir: D:\gamemode\gamemodes]
[path: C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\WINDOWS\System32\OpenSSH\;C:\Users\gagiu\AppData\Local\Microsoft\WindowsApps;]

 

linii?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. 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.

moduri samp