• 04 Juin 2026, 15:51:28


Auteur Sujet: Aide  (Lu 924 fois)

0 Membres et 1 Invité sur ce sujet

Hors ligne 69scorpion

  • MrCorona
  • *
  • Tueur en série
  • Messages: 125
    • Voir le profil
    • Scorpion City
Aide
« le: 23 Juillet 2009, 17:51:55 »
Bonjour,

J'ai un problème j'ai créer ce code mais le problème c'est quand je taz sa taz n'importe qui

exemple je fait sa  "/tazer 6" sa taz l'id n°1

//-------------[tazer]-----------------------------------------------------------------
if(strcmp(cmd, "/taz", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Utilisation: /taz [playerid]");
return 1;
}
new playa;
if(IsStringAName(tmp))
{
playa = GetPlayerID(tmp);
}
else
{
playa = strval(tmp);
}
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
if(gTeam[playerid] ==2)
{
TogglePlayerControllable(playa, 0);
PlayerCuffedTime[playerid] = 8;
LoopingAnim(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
format(string, sizeof(string), "* %s a tazer %s ", sendername ,sendername);
ProxDetector(30.0, playa, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
printf("%s", string);
GameTextForPlayer(playa, "~r~Tazer", 2500, 3);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_RED, "   vous n'êtes pas Policier!");
}
return 1;
}

Merci
« Modifié: 23 Juillet 2009, 17:56:44 par 69scorpion »
[RP] 69scorpion [100%]


Hors ligne S!m

  • *
  • Messages: 2341
    • Voir le profil
Re : Aide
« Réponse #1 le: 23 Juillet 2009, 18:24:23 »
Salut,

ton problème vient de cette section, vérifie bien quelle variable tu utilise pour quelle fonction...

PlayerCuffedTime[playerid] = 8;
LoopingAnim(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
format(string, sizeof(string), "* %s a tazer %s ", sendername ,sendername);
ProxDetector(30.0, playa, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);

++Sim++





Hors ligne cristab

  • *
  • Messages: 8379
    • Voir le profil
Re : Aide
« Réponse #2 le: 23 Juillet 2009, 18:37:34 »
j'ai deja vu ce code ici tente de le trouver et regarde bien
pas d'aide en PM, vous êtes sur un forum est il me semble que vous êtes la pour avoir de l'aide donc pourquoi MP une seul personne qui ne vous répondra pas alors qu'il y a plein de membre ici

Hors ligne 69scorpion

  • MrCorona
  • *
  • Tueur en série
  • Messages: 125
    • Voir le profil
    • Scorpion City
Re : Aide
« Réponse #3 le: 23 Juillet 2009, 18:42:42 »
Le problème et la :

LoopingAnim(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
il faut mettre "playa" a la place de "plyaerid"

comme sa :

LoopingAnim(playa, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
Merci pour l'aide mais j'ai un autre souci le Timeur marche pas.
[RP] 69scorpion [100%]