Jump to content

Question

Posted

Nick: Invizion

Problema: nu functioneaza comanda o scriu si nu-mi apare nimic..

Erori / warnings: nu

Lini/script:

Comanda

[pawn]

dcmd_setplevel(playerid, params[])//Set a player level

{

new amount;

if(!sscanf(params, "dd", giveplayerid, amount)) return SendClientMessage(playerid, 0xFF0000AA, "{FF0000}[ERROR]{FFFFFF}Usage: /setplevel [PlayerID] [pLevel]");

SetPlayerLevel(giveplayerid, amount);

return 1;

}

[/pawn]

stock

[pawn]SetPlayerLevel(playerid, plevel)

{

    PlayerInfo[playerid][pLevel] = plevel;

    dini_IntSet(PFile(playerid), "pLevel", PlayerInfo[playerid][pLevel]);

}[/pawn]

Ai incercat sa rezolvi singur ?: Da

8 answers to this question

Recommended Posts

Posted

Prin nimic ma refer ca nu functioneaza pe server nu ca nu apare Sendclientmessage...

Edit : E aces fs numai ca e adaugat in gm http://pastebin.com/sdf9zKfd si modificat ca sa nu se incurce cu celelate

Posted

dcmd_setplevel(playerid, params[])//Set a player level
{
	new amount;
	if(sscanf(params, "ud", giveplayerid, amount)) return SendClientMessage(playerid, 0xFF0000AA, "{FF0000}[ERROR]{FFFFFF}Usage: /setplevel [PlayerID] [pLevel]");
	SetPlayerLevel(giveplayerid, amount);
	return 1;
}

In fata la sscanf tu aveai "!" si nu trebuia sa fie acolo si tu la parametri sscanf aveai "dd" "d" inseamna un numar deci nu puteai sa dai /setplevel .ANdy47. 23 . Parametrul "u" este folosit pentru UserName/ID .

Posted

[pawn]C:\Users\Invizion\Desktop\Romania Dark Drift v2\pawno\include\Sinclude.inc(133) : warning 219: local variable "amount" shadows a variable at a preceding level

C:\Users\Invizion\Desktop\Romania Dark Drift v2\pawno\include\Sinclude.inc(151) : warning 219: local variable "amount" shadows a variable at a preceding level

C:\Users\Invizion\Desktop\Romania Dark Drift v2\gamemodes\RDD.pwn(4977) : error 035: argument type mismatch (argument 2)

C:\Users\Invizion\Desktop\Romania Dark Drift v2\gamemodes\RDD.pwn(57083) : error 001: expected token: ")", but found "&"

C:\Users\Invizion\Desktop\Romania Dark Drift v2\gamemodes\RDD.pwn(57083) : error 029: invalid expression, assumed zero

C:\Users\Invizion\Desktop\Romania Dark Drift v2\gamemodes\RDD.pwn(57083) : error 010: invalid function or declaration

C:\Users\Invizion\Desktop\Romania Dark Drift v2\gamemodes\RDD.pwn(57083 -- 57086) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

5 Errors.[/pawn]

?

Posted

Acel "[" apare de la forum cand scri "[]" poftim puneo asta :

dcmd_setplevel(playerid, params[])//Set a player level
{
    new amount;
    if(sscanf(params, "ud", giveplayerid, amount)) return SendClientMessage(playerid, 0xFF0000AA, "{FF0000}[ERROR]{FFFFFF}Usage: /setplevel [PlayerID] [pLevel]");
    SetPlayerLevel(giveplayerid, amount);
    return 1;
}

Posted

Încearcă aşa:

dcmd_setplevel(playerid, params[ ])//Set a player level

{

    new Playa, iAmount;

    if( sscanf( params, "ud", Playa, iAmount ) ) return SendClientMessage( playerid, 0xFF0000AA, "{FF0000}[ERROR]{FFFFFF}Usage: /setplevel [PlayerID] [Level]" );

    PlayerInfo[Playa][pLevel] = iAmount;

    dini_IntSet( PFile( Playa ), "pLevel", PlayerInfo[ Playa ][ pLevel ] );

    return 1;

}

I'm back bitches.

Posted

Topic Inchis , fara reply in ultimele 48 ore.

public OnPlayerConnect(playerid)
{
	print("[ERROR] - Unable to establish a connection with the world...");
	SendRconCommand("exit");
	return 1;
}

 

Guest
This topic is now closed to further replies.
×
×
  • 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.