| Welcome, Guest |
You have to register before you can post on our site.
|
| Online Users |
There are currently 192 online users. » 1 Member(s) | 189 Guest(s) Bing, Google
|
| Latest Threads |
Real-time pathfinder, opt...
Forum: Pawn Scripting
Last Post: hiago.sucesso.hs
3 hours ago
» Replies: 1
» Views: 147
|
Is there a WebSocket plug...
Forum: General Discussions
Last Post: hiago.sucesso.hs
3 hours ago
» Replies: 0
» Views: 4
|
What would you start?
Forum: Life
Last Post: HELLHOUND
2025-12-14, 10:32 PM
» Replies: 5
» Views: 10,298
|
After School Roleplay - G...
Forum: Advertisements
Last Post: cosminupgaming
2025-12-14, 02:06 PM
» Replies: 3
» Views: 410
|
PROJECT: LOS ANGELES — TH...
Forum: Advertisements
Last Post: cosminupgaming
2025-12-13, 07:16 PM
» Replies: 4
» Views: 760
|
LCSHosting.eu - Free SA-M...
Forum: Tech
Last Post: LCSLaces
2025-12-12, 04:57 PM
» Replies: 0
» Views: 66
|
Las Venturas Gang Wars - ...
Forum: Advertisements
Last Post: lvgwgta
2025-12-12, 03:29 PM
» Replies: 0
» Views: 49
|
Infamous Roleplay
Forum: Advertisements
Last Post: JakeFalcone
2025-12-11, 11:34 PM
» Replies: 0
» Views: 54
|
The server didn't respond...
Forum: Support
Last Post: HELLHOUND
2025-12-11, 01:17 PM
» Replies: 1
» Views: 197
|
Grand Gang War (GGW)
Forum: Advertisements
Last Post: piroballu
2025-12-09, 01:16 PM
» Replies: 1
» Views: 259
|
|
|
| Someone can help me with this? |
|
Posted by: Nicolas_Belic - 2021-02-19, 10:21 PM - Forum: Pawn Scripting
- Replies (1)
|
 |
PHP Code: new B_Privados[MAX_PLAYERS];
CMD:togmp(playerid, params[]) {
? ? if (!B_Privados[playerid]) {
? ? ? ? B_Privados[playerid] = 1;
? ? ? ? SendClientMessage(playerid, 2, "MP OFF");
? ? } else if (B_Privados[playerid]) {
? ? ? ? B_Privados[playerid] = 0;
? ? ? ? SendClientMessage(playerid, 2, "MP ON");
? ? }
? ? return 1;
}
[color=#333333][size=small][font=Tahoma, Verdana, Arial, sans-serif]PHP Code: [/font][/size][/color]CMD:mp(playerid, params[])
{
? ? new PmPlayer, Message[124], String[124], PlayerName[MAX_PLAYER_NAME], PlayerName2[MAX_PLAYER_NAME], PmSent[50];
? ? if (B_Privados[playerid] == 1) return SendClientMessage(playerid, 0, "You blocked the /mp");
? ? if (sscanf(params, "us[140]", PmPlayer, Message)) return SendClientMessage(playerid, 0xFFFFFFFF, "{D41818}[COMMAND]{AFAFAF} /mp <id> <text>");
? ? if (!IsPlayerConnected(PmPlayer)) return SendClientMessage(playerid, 0xFF0000FF, "{D41818}[ERROR]{AFAFAF} The player he's not connected");
? ? else{
? ? ? ? GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
? ? ? ? GetPlayerName(PmPlayer, PlayerName2, sizeof(PlayerName2));
? ? ? ? if (B_Privados[PmPlayer[0]] == 1) return SendClientMessage(playerid, 0, "This player has blocked the /mp");
? ? ? ? format(PmSent, sizeof(PmSent), "MP sended to %s", PlayerName2);
? ? ? ? SendClientMessage(playerid, 0xfce80cff, PmSent);
? ? ? ? format(String, sizeof(String), "[MP - ID:%d] %s: %s",playerid,PlayerName, Message);
? ? ? ? SendClientMessage(PmPlayer, 0xfdfe8bff, String);
? ? ? ? printf("%s to %s, %s", PlayerName, PlayerName2, Message);
? ? }
? ? return 1;
}
?y try to make a togmp (Private Message) system but i can't,??when the player sends me a private message I receive it when my / mp is disabled
|
|
|
|
| How i can add this to my command? |
|
Posted by: Nicolas_Belic - 2021-02-19, 02:49 PM - Forum: Pawn Scripting
- Replies (1)
|
 |
How can I make sure that only the players who are in my virtual world can read the message that I send, and that those who are not in my virtual world do not read the message?
Code: CMD:gl(playerid, params[])
{
? ? new Text[132], string[128], PlayerName[MAX_PLAYER_NAME];
? ? if(sscanf(params, "s[132]", Text))
? ? {
? ? ? ? SendClientMessage(playerid, -1, "{D41818}[COMANDO]{AFAFAF} /gl <texto>");
? ? }
? ? else
? ? {
? ? ? ? GetPlayerName(playerid, PlayerName, sizeof(PlayerName)); // storing player name first in the PlayerName variable
? ? ? ? format(string, sizeof(string), "[ID:%d - %s]: %s",playerid, PlayerName, Text); //[ID:12 - Sebasti?n Price] texto
? ? ? ? SendClientMessageToAll(0xFFFFFF00, string);
? ? }
? ? return 1;
}
|
|
|
|
| [HELP] NPC anim |
|
Posted by: spyrothedragon96 - 2021-02-19, 02:29 PM - Forum: Pawn Scripting
- No Replies
|
 |
Hi everyone, I have a little problem with NPCs.
I have created a fs animations for NPCs?to run via a command: /animname <npcname>
The problem is this: if there are two NPCs called NPC1 and NPC11 in game, when I assign an animation to NPC11 by typing for example /roadcross npc11, the animation is performed on NPC1.
It is as if the command captured NPC1 first.
Same thing happens, for example, if there are NPC2 and NPC21 ... The command is first captured by NPC2
Instead, if I delete NPC1 and now run the command on NPC11 it works.
Maybe there is a need to set the script so that you have to type the full name?
Do you know how I can solve?
This is the example of the script:
PHP Code: CMD:npc_roadcross(playerid, params[]) { new targetid; if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, -1, "Use: /npc_anim <playerid/npc>"); ? ? if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, -1, "Invalid Player id."); ? ? ApplyAnimation(targetid, "PED","roadcross",4.0,0,0,0,0,-1); ? ? return 1; }
|
|
|
|
| How to enter a crane in SA-MP? |
|
Posted by: jdefgh - 2021-02-19, 01:19 PM - Forum: Pawn Scripting
- Replies (1)
|
 |
How do enter or put a player in the Import/Export crane? I wanted to make a filterscript for Exports and Imports, but i have no idea how to enter it.
Because normally, there was a red spot where you could enter the crane, but i can't find a way to replicate it.
The crane is not a vehicle, so i can't just get its id and put the player in it. There should be a way to enter it.
Do i have to reinvent the wheel, or there's a way to put player in a crane?
|
|
|
|
| Rank Teams | TDM |
|
Posted by: Hitler - 2021-02-18, 08:00 PM - Forum: Pawn Scripting
- Replies (1)
|
 |
Espa?ol: ?Alguien sabe como hacer un rankings de teams?, me explico, una funcion para juntar los scores de los jugadores del team, uso MySQL
English:?Does anyone know how to make a team ranking? Let me explain, a function to gather the scores of the team players, I use MySQL
|
|
|
|
| How i can add this to my command? |
|
Posted by: Nicolas_Belic - 2021-02-18, 10:34 AM - Forum: Pawn Scripting
- Replies (1)
|
 |
Hi, how can I make it so that only I can teleport to people who are in the same virtual world and cannot if the virtual world is different?
Code: CMD:goto(playerid, params[]) {
? ?
? ? ? ? if (!sscanf(params, "d", params[0])) {
? ? ? ? ? ? if (IsPlayerConnected(params[0])) {
? ? ? ? ? ? ? ? if(GetPlayerVirtualWorld(params[0]) == GetPlayerVirtualWorld (playerid)) else SendClientMessage(playerid, -1, "Nope");
? ? ? ? ? ? ? ? new Float: p_x,Float: p_y,Float: p_z;
? ? ? ? ? ? ? ? GetPlayerPos(params[0], p_x, p_y, p_z);
? ? ? ? ? ? ? ? new interior = GetPlayerInterior(params[0]);
? ? ? ? ? ? ? ? new vw = GetPlayerVirtualWorld(params[0]);
? ? ? ? ? ? ? ? SetPlayerPos(playerid, p_x, p_y, p_z);
? ? ? ? ? ? ? ? SetPlayerInterior(playerid, interior);
? ? ? ? ? ? ? ? SetPlayerVirtualWorld(playerid, vw);
? ? ? ? ? ? ? ? return SendClientMessage(playerid, -1, "Teleported.");
? ? ? ? ? ? } else SendClientMessage(playerid, -1, "Player not found.");
? ? ? ? } else SendClientMessage(playerid, -1, "/goto [playerid]");
? ? ? ? return 1;
}
Correct me please
|
|
|
|
| Intro Server |
|
Posted by: Hitler - 2021-02-16, 03:14 AM - Forum: Pawn Scripting
- Replies (3)
|
 |
Espa?ol:?Cual pagina recomiendan para subir una musica para la intro de un servidor
English:?Which page do you recommend to upload a music for the intro of a server
|
|
|
|
| ayuda con registro dini |
|
Posted by: Nikolay_Staggs - 2021-02-16, 02:39 AM - Forum: Programaci?n
- Replies (2)
|
 |
tengo dos d?as tratando de resolver el problema pero no puedo, por que no se guardan los datos de los usuarios :)
?este es el c?digo"?
//_____Enum______//
enum DATA_PLAYER
{
? ? GAME_IDENTIFICADO,
? ? GAME_REGISTRADO,
GAME_EXP,
GAME_ADMIN_LEVEL,
GAME_SCORE,
GAME_MONEY
};
new PLAYER_INFO[MAX_PLAYERS][DATA_PLAYER];
//_________News__________//
new GAME_PASSWORD_INCORRECTA[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
? ? GAME_PASSWORD_INCORRECTA[playerid] = 0;
? ?
? ? new string[250];
? ? if (fexist(ac_ARCHIBO_USER(playerid)))
? ? {
PLAYER_INFO[playerid][GAME_REGISTRADO] = 1;
? ? }
? ?
? ? if (PLAYER_INFO[playerid][GAME_REGISTRADO])
? ? {
format(string, sizeof(string), "{CCCCCC}- Bienvenido %s.\n- Escribe tu contrase?a para identificarte", NAME_USER(playerid));
? ShowPlayerDialog(playerid, DIALOG_INGRESO, DIALOG_STYLE_PASSWORD, ""#BLANCO"Ingreso", string, "Ingresar", "Salir");
? ? }
? ? else
? ? {
? format(string, sizeof(string), "{CCCCCC}- Bienvenido %s.\n- Escribe una contrase?a para Registrarte", NAME_USER(playerid));
? ShowPlayerDialog(playerid, DIALOGO_REGISTRO, DIALOG_STYLE_PASSWORD, ""#BLANCO"Registrar", string, "Ok", "Salir");
? ? }
? ?
? ? RESET_USER(playerid);
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
? ? new string[250];
? ? if(dialogid == DIALOGO_REGISTRO)
? ? {
? ? ? ? dini_Create(ac_ARCHIBO_USER(playerid));
? ? ? ? dini_IntSet(ac_ARCHIBO_USER(playerid), "contrase?a",? ? ? ? adler32(inputtext));
? ? ? ? dini_IntSet(ac_ARCHIBO_USER(playerid), "Exp",? ? ? ? ? ? ? PLAYER_INFO[playerid][GAME_EXP]);
? ? ? ? dini_IntSet(ac_ARCHIBO_USER(playerid), "Admin",? ? ? ? ? ? PLAYER_INFO[playerid][GAME_ADMIN_LEVEL]);
? ? ? ? dini_IntSet(ac_ARCHIBO_USER(playerid), "Score",? ? ? ? ? ? PLAYER_INFO[playerid][GAME_SCORE]);
? ? ? ? dini_IntSet(ac_ARCHIBO_USER(playerid), "Dinero",? ? ? ? ? ? PLAYER_INFO[playerid][GAME_MONEY]);
? ? ? ?
? ? ? ? PLAYER_INFO[playerid][GAME_IDENTIFICADO] = 1;
? ? ? ? PLAYER_INFO[playerid][GAME_REGISTRADO] = 1;
? ? }
? ? else if(dialogid == DIALOG_INGRESO)
? ? {
? ? ? ? if (dini_Int(ac_ARCHIBO_USER(playerid), "Contrase?a") == adler32(inputtext))
? ? ? ? {
? ? ? ? ? ? PLAYER_INFO[playerid][GAME_IDENTIFICADO] = 1;
? ? ? ? ? ? PLAYER_INFO[playerid][GAME_REGISTRADO] = 1;
? ? ? ? ? ?
? ? ? ? ? ? PLAYER_INFO[playerid][GAME_EXP] = dini_Int? ? ? ? ? ? ? ? (ac_ARCHIBO_USER(playerid), "Exp");
? ? ? ? ? ? PLAYER_INFO[playerid][GAME_ADMIN_LEVEL] = dini_Int? ? ? ? (ac_ARCHIBO_USER(playerid), "Admin");
? ? ? ? ? ? SetPlayerScore(playerid, dini_Int? ? ? ? ? ? ? ? ? ? ? ? ? (ac_ARCHIBO_USER(playerid), "Score"));
? ? ? ? ? ? GivePlayerMoney(playerid, dini_Int? ? ? ? ? ? ? ? ? ? ? ? (ac_ARCHIBO_USER(playerid), "Dinero"));
? ? ? ? }
? ? ? ? else
? ? ? ? {
? ? ? ? ? ? GAME_PASSWORD_INCORRECTA[playerid];
? ? ? ? ? ? format(string, sizeof(string), "{CCCCCC}- Por favor %s.\n- Ingresa una contrase?a correcta", NAME_USER(playerid));
? ? ? ? ? ? ShowPlayerDialog(playerid, DIALOG_INGRESO, DIALOG_STYLE_PASSWORD, "{6F0000}Error", string, "Ok", "Salir");
? ? ? ? ? ? if(GAME_PASSWORD_INCORRECTA[playerid] == MAX_PASSWORD_INVALIDA)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? format(string,sizeof(string),"{6F0000}[Cuentas]: %s fue expulsado (Max intentos de ingresar(Contrase?a invalida))", NAME_USER(playerid));
? ? ? ? ? ? ? ? SendClientMessageToAll(-1, string);
? ? ? ? ? ? ? ? SendClientMessage(playerid, -1, "** Haz puesto varias contrase?as incorrectas has sido kickeado del servidor por seguridad.");
? ? ? ? ? ? ? ? Kick(playerid);
? ? ? ? ? ? }
? ? ? ? }
? ? }
? ? return 1;
}
stock NAME_USER(playerid)
{
new User_Name[MAX_PLAYER_NAME];
GetPlayerName(playerid, User_Name, sizeof(User_Name));
return User_Name;
}
stock ac_ARCHIBO_USER(playerid)
{
new User_Name[250];
GetPlayerName(playerid, User_Name, sizeof(User_Name));
format(User_Name, sizeof(User_Name), "DM_FREEROAM/%s.ini", User_Name);
return User_Name;
}
stock SAVE_USER(playerid)
{
? ? if(PLAYER_INFO[playerid][GAME_IDENTIFICADO])
? ? {
? ? ? ? dini_IntSet(ac_ARCHIBO_USER(playerid), "Exp",? ? ? ? ? PLAYER_INFO[playerid][GAME_EXP]);
dini_IntSet(ac_ARCHIBO_USER(playerid), "Admin",? ? ? ? PLAYER_INFO[playerid][GAME_ADMIN_LEVEL]);
? ? ? ? dini_IntSet(ac_ARCHIBO_USER(playerid), "Score",? ? ? ? GetPlayerScore(playerid));
? ? ? ? dini_IntSet(ac_ARCHIBO_USER(playerid), "Dinero",? ? ? ? GetPlayerMoney(playerid));
? ? }
? ? return 1;
}
stock adler32(buf[])
{
? ? new len = strlen(buf), key1 = 1, key2 = 0, n;
? ? for (n = 0; n < len; n )
? ? {
? ? ? ? key1 = (key1 buf[n])? % 65521;
? ? ? ? key2 = (key2 key1)? ? % 65521;
? ? }
? ? return (key2 << 16) key1;
}
stock RESET_USER(playerid)
{
? ? PLAYER_INFO[playerid][GAME_IDENTIFICADO] = 0;
? ? PLAYER_INFO[playerid][GAME_REGISTRADO] = 0;
? ? PLAYER_INFO[playerid][GAME_EXP] = 0;
? ? PLAYER_INFO[playerid][GAME_ADMIN_LEVEL] = 0;
? ? PLAYER_INFO[playerid][GAME_SCORE] = 0;
? ? PLAYER_INFO[playerid][GAME_MONEY] = 0;
? ? return 1;
}
|
|
|
|
|