• 22 Avril 2025, 08:29:01


Voir les contributions

Cette section vous permet de consulter les contributions (messages, sujets et fichiers joints) d'un utilisateur. Vous ne pourrez voir que les contributions des zones auxquelles vous avez accès.


Messages - Joshy

Pages: [1]
1
Scripting SA-MP [Pawn center] / Incompatibilité de deux codes PAWN?
« le: 02 Février 2012, 19:56:49 »
Bonsoir.

Il s'agit de la commande /pm:

if(strcmp(cmd, "/privatemessage", true) == 0 || strcmp(cmd, "/pm", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
      if (PlayerInfo[playerid][pAdmin] >= 0)
  {
        if(gPlayerLogged[playerid] == 0)
        {
            SendClientMessage(playerid, COLOR_GREY, "Vous devez êtres connecté!");
            return 1;
        }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /pm [playerid/PartOfName] [text]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (IsPlayerConnected(giveplayerid))
{
    if(giveplayerid != INVALID_PLAYER_ID)
    {
        if(HidePM[giveplayerid] > 0)
        {
            SendClientMessage(playerid, COLOR_GREY, "Ce joueur à bloqué les mp!");
            return 1;
        }

new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[MAX_STRING];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /pm [playerid/PartOfName] [text]");
return 1;
}
format(string, sizeof(string), "PM[HRP] de %s: %s", sendername, result);
SendClientMessage(giveplayerid, COLOR_YELLOW, string);
                        format(string, sizeof(string), "PM[HRP] envoyé à (%d)%s: %s", giveplayerid, giveplayer, (result));
SendClientMessage(playerid,  0xDABB3EAA, string);
format(string, sizeof(string), "%s envoie ce PM: '%s' à %s", sendername, result, giveplayer);
ABroadCast(0x80FF80FF,string,1);
return 1;

}
}
else
{
format(string, sizeof(string), " L'ID %d n'est pas connecté.", giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
    else
  {
SendClientMessage(playerid, COLOR_GRAD1, "Vous n'êtes pas autorisé a utiliser cette commande!");
  }
}
return 1;
}

et de la commande /sms:

if(strcmp(cmd, "/txt", true) == 0 || strcmp(cmd, "/t", true) == 0 || strcmp(cmd, "/sms", true) == 0)
{
    if(IsPlayerConnected(playerid))
{
    if(gPlayerLogged[playerid] == 0)
        {
            SendClientMessage(playerid, COLOR_GREY, "Vous devez être connecté!");
            return 1;
        }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/t)ext [numerotel] [text chat]");
return 1;
}
if(PlayerInfo[playerid][pPnumber] == 0)
{
SendClientMessage(playerid, COLOR_GRAD2, "Vous n'avez pas de telephone...");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), " %s prend son telephone.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
new phonenumb = strval(tmp);
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /sms [NumeroTel] [text chat]");
return 1;
}
if(FindIP(result)) /// Anti-Reclama
    {
        SendClientMessage(playerid, COLOR_RED, "[Anti-PUB] Vous avez été kick pour avoir fait une pub ");
        new advertiser[MAX_PLAYER_NAME];
GetPlayerName(playerid, advertiser, sizeof(advertiser));
format(string, sizeof(string), "[Anti-PUB] %s a été kické. Raison: Pub",advertiser);
SendClientMessageToAll(COLOR_LIGHTRED,string);
KickLog(string);
          Kick(playerid);
        return 1;
  }
if(phonenumb == 555)
{
if ((strcmp("Oui", result, true, strlen(result)) == 0) && (strlen(result) == strlen("Oui")))
{
SendClientMessage(playerid, COLOR_WHITE, "SMS Envoyé.");
if (gTeam[playerid] == 2 || gTeam[playerid] == 1)
{
SendClientMessage(playerid, COLOR_YELLOW, "SMS: Je n'ai aucune idée de quoi vous voulez parler, Sender: MOLE (555)");
RingTone[playerid] = 20;
return 1;
}
return 1;
}
else
{
SendClientMessage(playerid, COLOR_YELLOW, "SMS: Un simple Oui ira, Sender: MOLE (555)");
RingTone[playerid] = 20;
return 1;
}
}
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pPnumber] == phonenumb && phonenumb != 0)
{
giveplayerid = i;
Mobile[playerid] = giveplayerid; //caller connecting
if(IsPlayerConnected(giveplayerid))
{
    if(giveplayerid != INVALID_PLAYER_ID)
    {
        if(PhoneOnline[giveplayerid] > 0)
        {
            SendClientMessage(playerid, COLOR_GREY, "Le telephone de ce joueur est coupé!");
            return 1;
        }
format(string, sizeof(string), "SMS: %s, Expéditeur: %s (%d)", result,sendername,PlayerInfo[playerid][pPnumber]);
GetPlayerName(giveplayerid, sendername, sizeof(sendername));
format(string, sizeof(string), "ADMWARN: SMS: %s, Expéditeur: %s", result,sendername);
                                ABroadCast(0x80FF80FF,string,1);
//format(string, sizeof(string), " %s's phone beeps.", sendername);
RingTone[giveplayerid] =20;
SendClientMessage(playerid, COLOR_WHITE, "SMS Envoyé");
SendClientMessage(giveplayerid, COLOR_YELLOW, string);
SendClientMessage(playerid,  COLOR_YELLOW, string);
format(string, sizeof(string), "~r~$-%d", txtcost);
GameTextForPlayer(playerid, string, 5000, 1);
SafeGivePlayerMoney(playerid,-txtcost);
SBizzInfo[2][sbTill] += txtcost;
ExtortionSBiz(2, txtcost);
            PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
            Mobile[playerid] = 255;
return 1;
}
}
}
}
}
SendClientMessage(playerid, COLOR_GRAD2, "Echec de l'envoi du SMS...");
}
return 1;
}

Lorsqu'une commande marche, l'autre ne marche pas.

En principe ça affiche le message mais pas l'utilisateur, ou le numéro, etc...

Merci pour vos éclaircissements!

2
Scripting SA-MP [Pawn center] / Re : Alerte DM et commande DM
« le: 02 Février 2012, 19:52:52 »
Je ne sais pas comment ajuster, mettre dans l'ordre en fait.

3
Scripting SA-MP [Pawn center] / Re : Alerte DM et commande DM
« le: 02 Février 2012, 18:53:13 »
Toujours pas comprendre comment scripter.

Tes...
 :hs

4
Scripting SA-MP [Pawn center] / Re : Alerte DM et commande DM
« le: 02 Février 2012, 17:56:57 »
Toujours pas compris... je débute

5
Scripting SA-MP [Pawn center] / Alerte DM et commande DM
« le: 01 Février 2012, 22:55:54 »
Salut.

J'aimerais savoir comment faire lorsque quelqu'un vous tue, afficher aux adms et à celui tué:

Nom(ID) vous a tué avec l'arme (ID arme) - Prenez un screen (F8) en cas de DM

et aux adms:

Nom(ID) a tué Nom(ID) avec l'arme (ID arme) !

Aussi, une commande

/tuer [id]

Qui afficherais un message à celui DM

"Vous avez été malheureusement tué..."
+ un /me:
"(Tué) viens de se faire mitraillé et meurt..."

Merci!

6
Problèmes et bugs / Nouveau bug, réjouissant?
« le: 15 Juillet 2011, 01:06:34 »
Salut.

Lorsque je démarre mon serveur (en local), et que je tente de me connecter, mon serveur crash.

SA-MP Server: 0.3c



Exception At Address: 0x004A4B44



Registers:

EAX: 0x00000000   EBX: 0x00000400   ECX: 0x00000100   EDX: 0x7EFEFEFF

ESI: 0x00000000   EDI: 0x00FF0AC8   EBP: 0x000000DD   ESP: 0x0012EADC

EFLAGS: 0x00010216



Stack:

+0000: 0x01050020   0x00FF0A98   0x00FF0AC8   0x0047CFFB

+0010: 0x00FF0AC8   0x00000000   0x00000400   0x00EAF928

+0020: 0x00000000   0x0012EB34   0x021E11F0   0x000000DD

+0030: 0x0048837E   0x40400000   0x43AC0000   0x00000000

+0040: 0x00EAF928   0x00EAF928   0x01513050   0x01050020

+0050: 0x00000000   0x02104300   0x015392A4   0x00401096

+0060: 0x00EAF928   0x021E11F0   0x016C26EC   0x00402BB3

+0070: 0x00EAF928   0x00000022   0x0012EB6C   0x021E11F0

+0080: 0x0012F008   0x00000000   0x021E1880   0x00EAF928

+0090: 0x00000000   0x00118BE8   0x00B1EB04   0x00B1F188

+00A0: 0x00B1B1AC   0x00B1F178   0x00B1B1AC   0x01513050

+00B0: 0x016C26EC   0x00000000   0x01510020   0x001AF69C

+00C0: 0x0048782E   0x00EAF928   0x0012EFF8   0x00000135

+00D0: 0x00480064   0x65727453   0x72656D61   0x506E4F5F

+00E0: 0x6579616C   0x6E6F4372   0x7463656E   0x00487500

+00F0: 0x00EAF928   0x00EAF928   0x01513050   0x00000000

+0100: 0x00000000   0x00000000   0x00000000   0x00000000

+0110: 0x00000000   0x00000000   0x00000000   0x00000000

+0120: 0x00000000   0x00000000   0x00000000   0x00000000

+0130: 0x00000000   0x00000000   0x00000000   0x00000005


Une solution ? merci

7
Présentation de projet / Re : Re : CristabRP
« le: 14 Juillet 2011, 19:57:55 »
Il y a effectivement une ANPE, une mairie

8
Présentation de projet / Re : Re : CristabRP
« le: 14 Juillet 2011, 19:23:51 »
juste deja expliquer les differente faction ou je pige rien gang famille comment sa se passe ect ect

Les factions, c'est toi qui décide.

Il y a d'abord les factions dites légales:

- SFPD (la police quoi)
- FBI (éventuel)
- L'armée (éventuel)
- Les secours (éventuel)
- Le Gouvernement (éventuel)

Il y a les factions donc illégales:

- Yakuza -> Mafia (trafic d'armes)
- MS-13 -> Gang (trafic de drogue)
- Ballas -> Gang (trafic de drogue)
- Vagos -> Gang (trafic de drogue)
- Cosa Nostra -> Mafia (trafic d'armes)
- PimpZ -> Gang (trafic de drogue)
- OC Espagnols -> Mafia (trafic d'armes)

etc...

L'histoire des factions, c'est à toi de la créer;)

9
Présentation de projet / Re : CristabRP
« le: 14 Juillet 2011, 17:44:26 »

Bonjour suite au demande sur le showroom, suite a la recherche du RP sans casi pas de bug avec des possibiliter
d'ajouter pas mal de chose simplement.

Je me suis dit pourquoi ne pas lancer un projet de cette empleure a plusieurs bien sur comme je ne connait rien
Au RP il va me falloire des explications.

Donc avis a vous de rejoindre ou pas le projet.

Je sais juste que sa se passeras sur SF.

Ce post s'aggrandiras avec les suggestion seras joint les plan de script et j'en passe.

PS le projet ne peu debuter si on ne m'explique pas les coup des faction gang famille ect ect

Je suis quelqu'un de doué en RolePlay, je peux éventuellement t'aider dans ton projet uniquement pour le niveau apprentissage du Rp.

10
Problèmes et bugs / Re : Re : Problème de démarrage serveur
« le: 14 Juillet 2011, 17:26:18 »
corrige les deux ci dessous


C:\Documents and Settings\Utilisateur 2\Bureau\1\gamemodes\GS2.pwn(10733) : warning 213: tag mismatch
C:\Documents and Settings\Utilisateur 2\Bureau\1\gamemodes\GS2.pwn(10734) : warning 213: tag mismatch

J'ai remplacé la ligne et mis ça à la place (des deux lignes warning):
new Float:VX, Float:VY, Float:VZ;
GetVehiclePos(vehid, VX, VY, VZ);
Create3DTextLabel(message, 0xFFFFFFFF, VX, VY, VZ, 50.0, 0, 1);
      Attach3DTextLabelToVehicle(VehicleLicense[vehid], vehid, 0.0, 0.0, 2.0);

mais j'obtiens maintenant ce seul warning "tag mismatch"

C:\Documents and Settings\Utilisateur 2\Bureau\1\gamemodes\GS2.pwn(10736) : warning 213: tag mismatch

11
Problèmes et bugs / Re : Re : Problème de démarrage serveur
« le: 14 Juillet 2011, 13:21:01 »
dans ce cas ya des erreur dans le script parce que le .amx n'est pas trouvé

J'ai effectivement des warnings, mais je pensais que seul les errors étaient grave  :boulet

C:\Documents and Settings\Utilisateur 2\Bureau\1\pawno\include\SimStream.inc(54) : warning 219: local variable "rx" shadows a variable at a preceding level
C:\Documents and Settings\Utilisateur 2\Bureau\1\pawno\include\SimStream.inc(54) : warning 219: local variable "ry" shadows a variable at a preceding level
C:\Documents and Settings\Utilisateur 2\Bureau\1\pawno\include\SimStream.inc(54) : warning 219: local variable "rz" shadows a variable at a preceding level
C:\Documents and Settings\Utilisateur 2\Bureau\1\pawno\include\SimStream.inc(64) : warning 219: local variable "rx" shadows a variable at a preceding level
C:\Documents and Settings\Utilisateur 2\Bureau\1\pawno\include\SimStream.inc(72) : warning 219: local variable "ry" shadows a variable at a preceding level
C:\Documents and Settings\Utilisateur 2\Bureau\1\pawno\include\SimStream.inc(80) : warning 219: local variable "rz" shadows a variable at a preceding level
C:\Documents and Settings\Utilisateur 2\Bureau\1\gamemodes\GS2.pwn(10733) : warning 213: tag mismatch
C:\Documents and Settings\Utilisateur 2\Bureau\1\gamemodes\GS2.pwn(10734) : warning 213: tag mismatch
C:\Documents and Settings\Utilisateur 2\Bureau\1\gamemodes\GS2.pwn(53573) : warning 217: loose indentation

12
Problèmes et bugs / Re : Re : Problème de démarrage serveur
« le: 14 Juillet 2011, 13:18:46 »
ta pas compilé

Je vous assure que je l'ai compilé.

13
Problèmes et bugs / Problème de démarrage serveur [RESOLU]
« le: 14 Juillet 2011, 13:08:53 »
Problème réglé.

Remerciements: cristab, Camil-Beno!

14
Problèmes et bugs / Grilles/portes invisibles.
« le: 26 Juin 2011, 22:14:50 »
Bonsoir.

J'ai récemment acquis un GAMEMODE en 0.3a (ou 0.3b) que j'ai converti en 0.3c. Seulement, le mapping ne fonctionnait pas. J'ai alors trouvé un streamer mais malheureusement, en changeant celui-ci, les portes, grilles et tout ce qui bloque un accès (grillage etc.) ne sont plus visibles  :boulet.

Auriez-vous une solution? Merci

15
Problèmes et bugs / Problème map.
« le: 24 Juin 2011, 15:26:58 »
Bonjour,

j'ai utilisé un serveur SA:MP en 0.3a (ou b). J'ai compilé le G.M mais le problème c'est que le mapping est très long (voir invisible). Je pense que c'est dû au fait que je n'ai pas compilé les fichiers MAP.

Dans quel dossier se trouve ses fichiers SVP ? Merci d'avance...

Pages: [1]