• 09 Juillet 2025, 16:16:54


Auteur Sujet: Commands qui marche pas  (Lu 2900 fois)

0 Membres et 1 Invité sur ce sujet

Hors ligne marsu

  • Je suis un gros noob
  • *
  • Tueur en série
  • Messages: 175
    • Voir le profil
Commands qui marche pas
« le: 02 Février 2008, 19:24:25 »
Voila ma creation parsque je mennuyai :)

if (strcmp(cmdtext, "/sms17", true) == 0) {

format(string, sizeof(string), "[ ! ]%s:Demande La Police (Son id: %d).", PlayerName, playerid);
        SendClientMessage(PlayerName,giveplayerid, COLOR_RED1, string);
return 1;
}

Mais ya 1 erreur :(

error 035: argument type mismatch (argument 1)
83.194.129.129:7777
[FR]Server Rpg 5.3 By Lites Recrute
http://Http://samp.teamfr.com

|Evolution Server|
- - - _ _ _

Hors ligne ApocKalipsS

  • *
  • Gangster
  • **** | Une experience GTA IV hors du commun !
  • Messages: 1141
    • Voir le profil
Re : Commands qui marche pas
« Réponse #1 le: 02 Février 2008, 20:01:59 »
J'imagine que tu veux envoyer un message aux policiers ?

Hors ligne NatiVe™

  • *
  • Messages: 7977
    • Voir le profil
Re : Commands qui marche pas
« Réponse #2 le: 02 Février 2008, 20:02:25 »
Lol,

Tu met PlayerName, playerid sans l'avoir definie !

Aller je t'aide...

GetPlayerName(cherche pour la);
NV.



Tu vois avant? Bah j'étais là encore avant!

Hors ligne marsu

  • Je suis un gros noob
  • *
  • Tueur en série
  • Messages: 175
    • Voir le profil
Re : Commands qui marche pas
« Réponse #3 le: 02 Février 2008, 20:46:27 »
Ou je met le

GetPlayerName(cherche pour la); ? plz
83.194.129.129:7777
[FR]Server Rpg 5.3 By Lites Recrute
http://Http://samp.teamfr.com

|Evolution Server|
- - - _ _ _

Hors ligne NatiVe™

  • *
  • Messages: 7977
    • Voir le profil
Re : Commands qui marche pas
« Réponse #4 le: 02 Février 2008, 20:50:22 »
Avant le message

NV.



Tu vois avant? Bah j'étais là encore avant!

Hors ligne marsu

  • Je suis un gros noob
  • *
  • Tueur en série
  • Messages: 175
    • Voir le profil
Re : Commands qui marche pas
« Réponse #5 le: 02 Février 2008, 20:51:42 »
Je voit toujour pas :(

un exemple stp
83.194.129.129:7777
[FR]Server Rpg 5.3 By Lites Recrute
http://Http://samp.teamfr.com

|Evolution Server|
- - - _ _ _

Hors ligne Eloctro

  • Pawno Fan
  • *
  • Grand Banditisme
  • Aight !
  • Messages: 846
    • Voir le profil
    • GtaSA-RP
Re : Commands qui marche pas
« Réponse #6 le: 02 Février 2008, 21:09:05 »
Aller moi je me lance je sui pas sur ses pas mon genre de commmande :
if (strcmp(cmdtext, "/sms17", true) == 0) {
GetPlayerName(player);
format(string, sizeof(string), "[ ! ]%s:Demande La Police (Son id: %d).", PlayerName, playerid);
        SendClientMessage(PlayerName,giveplayerid, COLOR_RED1, string);
return 1;
}

Hors ligne marsu

  • Je suis un gros noob
  • *
  • Tueur en série
  • Messages: 175
    • Voir le profil
Re : Commands qui marche pas
« Réponse #7 le: 02 Février 2008, 21:11:40 »
Non c'est pas sa mais sa ressemble


if (strcmp(cmdtext, "/sms17", true) == 0) {
        GetPlayerName(player,giveplayerid,playerid);
format(string, sizeof(string), "[ ! ]%sQuelqu'un Demande La Police (Son id: %d).",playerid);
        SendClientMessage(giveplayerid, COLOR_RED1, string);
return 1;
}

erreur

error 017: undefined symbol "player"
83.194.129.129:7777
[FR]Server Rpg 5.3 By Lites Recrute
http://Http://samp.teamfr.com

|Evolution Server|
- - - _ _ _

Hors ligne NatiVe™

  • *
  • Messages: 7977
    • Voir le profil
Re : Commands qui marche pas
« Réponse #8 le: 02 Février 2008, 21:21:43 »
Voila...

if (strcmp(cmdtext, "/sms17", true) == 0) {
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
format(string, sizeof(string), "[ ! ] %s: Demande La Police (Son id: %d).", PlayerName, playerid);
SendClientMessage(PlayerName,giveplayerid, COLOR_RED1, string);
return 1;
}

J'ai pas tester !

NV.



Tu vois avant? Bah j'étais là encore avant!

Hors ligne marsu

  • Je suis un gros noob
  • *
  • Tueur en série
  • Messages: 175
    • Voir le profil
Re : Commands qui marche pas
« Réponse #9 le: 02 Février 2008, 21:23:55 »
preske :(

error 017: undefined symbol "PlayerName"
error 017: undefined symbol "PlayerName"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line

Avec ton code jai mis new PlayerName;

Est voila

warning 225: unreachable code
argument type mismatch (argument 2)
error 035: argument type mismatch (argument 2)
error 035: argument type mismatch (argument 3)
« Modifié: 02 Février 2008, 21:27:00 par marsu »
83.194.129.129:7777
[FR]Server Rpg 5.3 By Lites Recrute
http://Http://samp.teamfr.com

|Evolution Server|
- - - _ _ _

Hors ligne NatiVe™

  • *
  • Messages: 7977
    • Voir le profil
Re : Commands qui marche pas
« Réponse #10 le: 02 Février 2008, 21:59:20 »
Quel endouille que je suis !

if (strcmp(cmdtext, "/sms17", true) == 0) {
new PlayerName[MAX_PLAYER_NAME];
new string[256];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
format(string, sizeof(string), "[ ! ] %s: Demande La Police (Son id: %d).", PlayerName, playerid);
SendClientMessage(PlayerName,giveplayerid, COLOR_RED1, string);
return 1;
}

NV.



Tu vois avant? Bah j'étais là encore avant!

Hors ligne marsu

  • Je suis un gros noob
  • *
  • Tueur en série
  • Messages: 175
    • Voir le profil
Re : Commands qui marche pas
« Réponse #11 le: 02 Février 2008, 22:10:59 »
Toujour pas

D:\PROGRA~1\ROCKST~1\GTASAN~1\FILTER~1\sad.pwn(140) : warning 225: unreachable code
D:\PROGRA~1\ROCKST~1\GTASAN~1\FILTER~1\sad.pwn(183) : warning 219: local variable "PlayerName" shadows a variable at a preceding level
D:\PROGRA~1\ROCKST~1\GTASAN~1\FILTER~1\sad.pwn(184) : warning 219: local variable "string" shadows a variable at a preceding level
D:\PROGRA~1\ROCKST~1\GTASAN~1\FILTER~1\sad.pwn(187) : error 035: argument type mismatch (argument 1)
D:\PROGRA~1\ROCKST~1\GTASAN~1\FILTER~1\sad.pwn(179) : warning 203: symbol is never used: "PlayerName"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


1 Error.

83.194.129.129:7777
[FR]Server Rpg 5.3 By Lites Recrute
http://Http://samp.teamfr.com

|Evolution Server|
- - - _ _ _

Hors ligne ApocKalipsS

  • *
  • Gangster
  • **** | Une experience GTA IV hors du commun !
  • Messages: 1141
    • Voir le profil
Re : Commands qui marche pas
« Réponse #12 le: 03 Février 2008, 09:30:57 »
C'est quel ligne le "187" ?

Hors ligne marsu

  • Je suis un gros noob
  • *
  • Tueur en série
  • Messages: 175
    • Voir le profil
Re : Commands qui marche pas
« Réponse #13 le: 03 Février 2008, 10:55:36 »
Une des lignes des command /sms17
83.194.129.129:7777
[FR]Server Rpg 5.3 By Lites Recrute
http://Http://samp.teamfr.com

|Evolution Server|
- - - _ _ _

Hors ligne lilem

  • Team CSL
  • *
  • Bandit
  • Messages: 251
    • Voir le profil
Re : Commands qui marche pas
« Réponse #14 le: 05 Février 2008, 12:42:54 »
tien je chercher aussi un peux prés une commandes comme ça mais saufe pas pour la police  :jesors