DCMD help
#1

Hello SAMP people,

Im having a big problem with my server.
First things first the problem is with DCMD
Ive just copied and paste it outa my old script for 0.2X

Код:
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
And here OnPlayerCommandText

Код:
public OnPlayerCommandText(playerid, cmdtext[])
Код:
dcmd_adminarea(playerid,params[]) {
	#pragma unused params
  if(IsPlayerAdmin(playerid)) {
	  SetPlayerPos(playerid, AdminArea[0], AdminArea[1], AdminArea[2]);
	  SetPlayerFacingAngle(playerid, AdminArea[3]);
	  SetPlayerInterior(playerid, AdminArea[4]);
		SetPlayerVirtualWorld(playerid, AdminArea[5]);
		return GameTextForPlayer(playerid,"Welcome Admin",1000,3);
	}
	return 1;
}
Still the codes worked with 0.2X but not in 0.3

Whats the problem?
Any solutions please?
Reply
#2

pawn Код:
OnPlayerCommandText(playerid, cmdtext[])
{
    dcmd(adminarea, 9, cmdtext);
    return 0;
}
Place the dcmd command, outside your callbacks.
Reply
#3

Quote:
Originally Posted by |∞|-Рцппσĵσ-|∞|
pawn Код:
OnPlayerCommandText(playerid, cmdtext[])
{
    dcmd(adminarea, 9, cmdtext);
    return 0;
}
Place the dcmd command, outside your callbacks.
Tried it still doesnt work..
Reply
#4

Anyone?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)