Pawno Command Help
#1

Ok, basically I am looking for help with 3/4 things in Pawno scripting.

1. how to make a /enter and /exit command. (there is a thread for this already but its not very clear and messes up)
2. how to make a /me or /do command
3. where to put DisableInteriorEnterExits()

Ok for the /enter and /exit command. I followed the tutorial that I already found on this forum, but I was having problems with it. I got the /enter command working.. but once I was inside the interior and did /exit, it just teleported me back to where I spawned inside the interior. Well, I want to get outside of the interior where i first typed /enter (at the yellow "I")


It would be great it someone could post the pawno code here for this command and explain which co-ordinates go where.

NOW.. the second question is pretty self explanatory.. I would like someone to post the pawno code on putting a /me comand and /do command. (EX: /me farts. would be Stephen_Deville farts.) and example for /do (/do the car started successfully. would be "The car started successfully. ((Stephen_Deville)) )

LASTLY..

This sort of goes along with the /enter and /exit command. On the /enter and /exit tutorial that I read, they said you could do DisableInteriorEnterExits () and that would get rid of those big floating yellow triangles that are in single player at interiors.

If someone could post the pawno code on where to put that and what to do in the (), it would be great.

Mainly this thread is becasue I am looking for someone to post pawno codes for me. Sorry for all the questions. Im new to scripting and there really arent that many pawno tutorials for what IM looking for.

Thanks in advance

STEPHEN_DEVILLE (now steven_enstein on US-RP)
Reply
#2

Код:
public OnPlayerCommandText(playerid, cmdtext[]) 
  if(!strcmp(cmdtext, "/do", true, 3))
  {
    if(!cmdtext[3])return SendClientMessage(playerid, 0xFF0000FF, "ERROR: USAGE: /do [thing]");
    new str[128]; 
    GetPlayerName(playerid, str, sizeof(str)); 
    format(str, sizeof(str), "%s ((%s))", cmdtext[4], str); 
    SendClientMessageToAll(0xFFFF00AA, str); 
    return 1;
  }
  return 0;
}
i think its like this I ((THINK))
Reply
#3

wrong posttt
Reply
#4

/me

Код:
public OnPlayerCommandText(playerid, cmdtext[]) 
{
  if(!strcmp(cmdtext, "/me", true, 3)) 
  {
    if(!cmdtext[3])return SendClientMessage(playerid, 0xFF0000FF, "ERROR: USAGE: /me [action]"); 
    new str[128];
    GetPlayerName(playerid, str, sizeof(str));
    format(str, sizeof(str), "* %s %s", str, cmdtext[4]); 
    SendClientMessageToAll(0xFFFF00AA, str);
    return 1;
  }
  return 0;
}
Reply
#5

Quote:
Originally Posted by Stephen_Deville
Посмотреть сообщение
Ok, basically I am looking for help with 3/4 things in Pawno scripting.

1. how to make a /enter and /exit command. (there is a thread for this already but its not very clear and messes up)
2. how to make a /me or /do command
3. where to put DisableInteriorEnterExits()

Ok for the /enter and /exit command. I followed the tutorial that I already found on this forum, but I was having problems with it. I got the /enter command working.. but once I was inside the interior and did /exit, it just teleported me back to where I spawned inside the interior. Well, I want to get outside of the interior where i first typed /enter (at the yellow "I")


It would be great it someone could post the pawno code here for this command and explain which co-ordinates go where.

NOW.. the second question is pretty self explanatory.. I would like someone to post the pawno code on putting a /me comand and /do command. (EX: /me farts. would be Stephen_Deville farts.) and example for /do (/do the car started successfully. would be "The car started successfully. ((Stephen_Deville)) )

LASTLY..

This sort of goes along with the /enter and /exit command. On the /enter and /exit tutorial that I read, they said you could do DisableInteriorEnterExits () and that would get rid of those big floating yellow triangles that are in single player at interiors.

If someone could post the pawno code on where to put that and what to do in the (), it would be great.

Mainly this thread is becasue I am looking for someone to post pawno codes for me. Sorry for all the questions. Im new to scripting and there really arent that many pawno tutorials for what IM looking for.

Thanks in advance

STEPHEN_DEVILLE (now steven_enstein on US-RP)
DisableInteriorEnterExits() Put this under ongamemodeinit()
Reply
#6

Quote:
Originally Posted by GoldenM4
Посмотреть сообщение
/me

Код:
public OnPlayerCommandText(playerid, cmdtext[]) 
{
  if(!strcmp(cmdtext, "/me", true, 3)) 
  {
    if(!cmdtext[3])return SendClientMessage(playerid, 0xFF0000FF, "ERROR: USAGE: /me [action]"); 
    new str[128];
    GetPlayerName(playerid, str, sizeof(str));
    format(str, sizeof(str), "* %s %s", str, cmdtext[4]); 
    SendClientMessageToAll(0xFFFF00AA, str);
    return 1;
  }
  return 0;
}
That sends it to everyone and I'm pretty sure that's not what he wants, anyways use a proxdetector to send it locally.
(He might want it like you did so who knows..)
Reply
#7

Quote:
Originally Posted by Darklom
Посмотреть сообщение
That sends it to everyone and I'm pretty sure that's not what he wants, anyways use a proxdetector to send it locally.
(He might want it like you did so who knows..)
oh shit thanks for poniting that out change send messegar thing to SendClientMessage tha might work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)