Jump to content
  • 0

ajutor comanda


Davidoff7776

Question

14 answers to this question

Recommended Posts

  • 0

Care este linia 13949? Și vezi că am dat edit la postare ... am nevoie de linia 13949

 

 

EDIT: Mda...nu am observat ceva , poftim: 

CMD:gotocp(playerid, params[]) {
    if(PlayerInfo[playerid][pAdmin] < 1) return 1;
    if(InGame[playerid] == 1) return SCM(playerid, COLOR_LGREEN, "Nu poti folosi aceasta comanda deoarece esti in arena! Foloseste comanda /leavearena pentru a iesi.");
    SetPlayerPosEx(playerid,CheckpointPos[playerid][0], CheckpointPos[playerid][1], CheckpointPos[playerid][2]);
    SetPlayerVirtualWorld(playerid, 0);
    SetPlayerInterior(playerid, 0);
    new string[180];
    format(string, sizeof(string), "AdmCmd: %s s-a teleportat la checkpoint.",PlayerNameEx(playerid));
    if(GetPVarInt(playerid, "Cover") == 0) SendAdminMessage(COLOR_LOGS, string, 1);
    return 1;
}

Scuze , pentru mine este abea dimineață , acuma m-am trezit. :))

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

 

Link to comment
Share on other sites

  • 0

 

La inceputul gamemodeului  new AdminCP[MAX_PLAYERS][3];

CTRL+H SetPlayerCheckpoint si jos SetPlayerCheckpointEx  pentru a inlocui toate funtiile de setare a checkpointurilor

la finalul gmului

stock SetPlayerCheckpointEx(playerid, Float:x, Float:y, Float:z, Float:size)
{
    AdminCP[playerid][0] = x;
    AdminCP[playerid][1] = y;
    AdminCP[playerid][2] = z;
    return SetPlayerCheckpoint(playerid, x, y, z, size);
}

 

iar pentru comanda sper ca stii cmd: gotocp   si setplayerpoz  AdminCP[playerid][0] , blabla[1], blabla[2]

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

  • 0

 

Acum 11 ore, Mister a spus:

 

La inceputul gamemodeului  new AdminCP[MAX_PLAYERS][3];

CTRL+H SetPlayerCheckpoint si jos SetPlayerCheckpointEx  pentru a inlocui toate funtiile de setare a checkpointurilor

la finalul gmului


stock SetPlayerCheckpointEx(playerid, Float:x, Float:y, Float:z, Float:size)
{
    AdminCP[playerid][0] = x;
    AdminCP[playerid][1] = y;
    AdminCP[playerid][2] = z;
    return SetPlayerCheckpoint(playerid, x, y, z, size);
}

 

iar pentru comanda sper ca stii cmd: gotocp   si setplayerpoz  AdminCP[playerid][0] , blabla[1], blabla[2]

Am o mica intrebare: Eu am gm-ul Burned si toate functiile SetPlayerCheckpoint sunt deja inlocuite cu SetPlayerCheckpointEx , iar daca fac cum ai zis tu vor deveni SetPlayerCheckpointExEx , este in regula?

Edited by Davidoff7776
Link to comment
Share on other sites

  • 0

Cauta la finalul gamemodeului stock setplayercheckpointex sau public setplayer.... ori simplu trebuie sa fie o functie daca nu stii cum arata o functie nu prea mai are rost sa incerci. In primul meu  comentariu este un stock  cu parametri asa ar trebui sa arate si la tine

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

  • 0
Acum 14 ore, Mister a spus:

 

La inceputul gamemodeului  new AdminCP[MAX_PLAYERS][3];

CTRL+H SetPlayerCheckpoint si jos SetPlayerCheckpointEx  pentru a inlocui toate funtiile de setare a checkpointurilor

la finalul gmului


stock SetPlayerCheckpointEx(playerid, Float:x, Float:y, Float:z, Float:size)
{
    AdminCP[playerid][0] = x;
    AdminCP[playerid][1] = y;
    AdminCP[playerid][2] = z;
    return SetPlayerCheckpoint(playerid, x, y, z, size);
}

 

iar pentru comanda sper ca stii cmd: gotocp   si setplayerpoz  AdminCP[playerid][0] , blabla[1], blabla[2]

exact cum a zis el doar ca nu este necesara utilizarea de "stock" . A fost des discutata si pe alte forumuri si nu este bine sa folosesti stock decat cand este cazul.

astfel,poti utiliza pur si simplu fara stock,altfel:

SetPlayerCheckpointEx(playerid, Float:x, Float:y, Float:z, FLoat:size)
	{
	...
	...
	

Link to comment
Share on other sites

  • 0
Acum 10 minute, Mister a spus:

Cauta la finalul gamemodeului stock setplayercheckpointex sau public setplayer.... ori simplu trebuie sa fie o functie daca nu stii cum arata o functie nu prea mai are rost sa incerci. In primul meu  comentariu este un stock  cu parametri asa ar trebui sa arate si la tine

poftim

function SetPlayerCheckpointEx(playerid, Float:x, Float:y, Float:z, Float:size) {
    SetPlayerCheckpoint(playerid, x, y, z, size);
    CheckpointPos[playerid][0] = x;
    CheckpointPos[playerid][1] = y;
    CheckpointPos[playerid][2] = z;
    return 1;
}

Link to comment
Share on other sites

  • 0

Nu mai ai nevoie de nimic din ce am postat pentru ca este deja facut, doar faci comanda cmd: gotocp playerid params  

setplayerpos 

CheckpointPos[playerid][0]
CheckpointPos[playerid][1]
CheckpointPos[playerid][2]

Restrictie de admin un sendclientmessage si gata

  • Upvote 1

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

  • 0
Acum 54 minute, Mister a spus:

Nu mai ai nevoie de nimic din ce am postat pentru ca este deja facut, doar faci comanda cmd: gotocp playerid params  

setplayerpos 


CheckpointPos[playerid][0]

CheckpointPos[playerid][1]

CheckpointPos[playerid][2]

Restrictie de admin un sendclientmessage si gata

am primit erorile astea:

	C:\Users\DAVID\Desktop\burned.ro\gamemodes\wa-rpg.pwn(13949) : warning 213: tag mismatch
C:\Users\DAVID\Desktop\burned.ro\gamemodes\wa-rpg.pwn(13949) : error 001: expected token: ",", but found ";"
C:\Users\DAVID\Desktop\burned.ro\gamemodes\wa-rpg.pwn(13953) : error 001: expected token: ",", but found ";"
C:\Users\DAVID\Desktop\burned.ro\gamemodes\wa-rpg.pwn(13946) : warning 203: symbol is never used: "id"
Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase
	
2 Errors.

CMD:gotocp(playerid, params[]) {
    new id;
    if(PlayerInfo[playerid][pAdmin] < 1) return 1;
    if(InGame[playerid] == 1) return SCM(playerid, COLOR_LGREEN, "Nu poti folosi aceasta comanda deoarece esti in arena! Foloseste comanda /leavearena pentru a iesi.");
    SetPlayerPosEx(CheckpointPos[playerid][0], CheckpointPos[playerid][1], CheckpointPos[playerid][2];
    SetPlayerVirtualWorld(playerid, 0);
    SetPlayerInterior(playerid, 0);
    new string[180];
    format(string, sizeof(string), "AdmCmd: %s s-a teleportat la checkpoint.";
    if(GetPVarInt(playerid, "Cover") == 0) SendAdminMessage(COLOR_LOGS, string, 1);
    return 1;
}
Edited by Davidoff7776
Link to comment
Share on other sites

  • 0
CMD:gotocp(playerid, params[]) {
    if(PlayerInfo[playerid][pAdmin] < 1) return 1;
    if(InGame[playerid] == 1) return SCM(playerid, COLOR_LGREEN, "Nu poti folosi aceasta comanda deoarece esti in arena! Foloseste comanda /leavearena pentru a iesi.");
    SetPlayerPosEx(CheckpointPos[playerid][0], CheckpointPos[playerid][1], CheckpointPos[playerid][2]);
    SetPlayerVirtualWorld(playerid, 0);
    SetPlayerInterior(playerid, 0);
    new string[180];
    format(string, sizeof(string), "AdmCmd: %s s-a teleportat la checkpoint.",PlayerNameEx(playerid));
    if(GetPVarInt(playerid, "Cover") == 0) SendAdminMessage(COLOR_LOGS, string, 1);
    return 1;
}

În loc de PlayerNameEx(playerid) pui funcția pe care o ai tu ... 

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

 

Link to comment
Share on other sites

  • 0
Acum 4 minute, Ph0eniX a spus:

CMD:gotocp(playerid, params[]) {
    new id;
    if(PlayerInfo[playerid][pAdmin] < 1) return 1;
    if(InGame[playerid] == 1) return SCM(playerid, COLOR_LGREEN, "Nu poti folosi aceasta comanda deoarece esti in arena! Foloseste comanda /leavearena pentru a iesi.");
    SetPlayerPosEx(CheckpointPos[playerid][0], CheckpointPos[playerid][1], CheckpointPos[playerid][2]);
    SetPlayerVirtualWorld(playerid, 0);
    SetPlayerInterior(playerid, 0);
    new string[180];
    format(string, sizeof(string), "AdmCmd: %s s-a teleportat la checkpoint.");
    if(GetPVarInt(playerid, "Cover") == 0) SendAdminMessage(COLOR_LOGS, string, 1);
    return 1;
}

....

Merci :* , dar pot sa scap de astea?

	C:\Users\DAVID\Desktop\burned.ro\gamemodes\wa-rpg.pwn(13949) : warning 213: tag mismatch
C:\Users\DAVID\Desktop\burned.ro\gamemodes\wa-rpg.pwn(13949) : warning 202: number of arguments does not match definition
C:\Users\DAVID\Desktop\burned.ro\gamemodes\wa-rpg.pwn(13946) : warning 203: symbol is never used: "id"
Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase
	
3 Warnings.

Link to comment
Share on other sites

Join the conversation

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

Guest
Answer this question...

×   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

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.