[Problem] /Casque Problem
#1

Hello guys,

I have a big problem with the command /casque.

When I do the command /casque 1 (1,2,3,4 or 5) It puts the helmet on my head, but the helmet comes off immediately.

Why ?

It also does this with the command /hat

Casque = Helmet

Here is my code:

Код:
	if(strcmp(cmd,"/casque",true)==0)
	{
	    new tmpCarId = GetPlayerVehicleID(playerid);
	    new model;
	    model = GetVehicleModel(tmpCarId);
	    if(model!=471 && model!=581 && model!=521 && model!=522 && model!=523 && model!=463 && model!=461 && model!=468 && model!=586 && model!=462 && tmpCarId != 0)
	        {SendClientMessage(playerid, COLOR_VEHICULE, "[Vehicule] Vous n'кtes pas sur une moto !"); return 1;}
        GetPlayerName(playerid, playername, sizeof(playername));
		if(Ceinture[playerid]==0)
		{
		    tmp = strtok(cmdtext,idx);
		    if(!strlen(tmp))
		        {SendClientMessage(playerid, COLOR_VEHICULE, "[Casque] Choisi l'id de ton casque avec /casque ID (de 1-5)"); return 1;}

			new casqueid = strval(tmp);
			if(casqueid < 0 || casqueid > 5)
			    {SendClientMessage(playerid, COLOR_VEHICULE, "[Casque] L'id du casque est entre 1 et 5."); return 1;}
			    
			Ceinture[playerid]=1;
			format(proxy_msg, sizeof(proxy_msg), "%s met son casque.", playername);
			OnePlayAnim(playerid, "SHOP", "ROB_Shifty", 4.0, 0, 0, 0, 0, 0);
			OnePlayAnim(playerid, "SHOP", "ROB_Shifty", 4.0, 0, 0, 0, 0, 0);
			new skin = GetPlayerSkin(playerid);
			switch(casqueid)
			{
			    case 1: SetPlayerAttachedObject(playerid, 1, 18645, 2, SkinOffSet_Casque[skin][0], SkinOffSet_Casque[skin][1], SkinOffSet_Casque[skin][2], SkinOffSet_Casque[skin][3], SkinOffSet_Casque[skin][4], SkinOffSet_Casque[skin][5]);
			    case 2: SetPlayerAttachedObject(playerid, 1, 18976, 2, SkinOffSet_Casque[skin][0], SkinOffSet_Casque[skin][1], SkinOffSet_Casque[skin][2], SkinOffSet_Casque[skin][3], SkinOffSet_Casque[skin][4], SkinOffSet_Casque[skin][5]);
			    case 3: SetPlayerAttachedObject(playerid, 1, 18977, 2, SkinOffSet_Casque[skin][0], SkinOffSet_Casque[skin][1], SkinOffSet_Casque[skin][2], SkinOffSet_Casque[skin][3], SkinOffSet_Casque[skin][4], SkinOffSet_Casque[skin][5]);
			    case 4: SetPlayerAttachedObject(playerid, 1, 18978, 2, SkinOffSet_Casque[skin][0], SkinOffSet_Casque[skin][1], SkinOffSet_Casque[skin][2], SkinOffSet_Casque[skin][3], SkinOffSet_Casque[skin][4], SkinOffSet_Casque[skin][5]);
			    case 5: SetPlayerAttachedObject(playerid, 1, 18979, 2, SkinOffSet_Casque[skin][0], SkinOffSet_Casque[skin][1], SkinOffSet_Casque[skin][2], SkinOffSet_Casque[skin][3], SkinOffSet_Casque[skin][4], SkinOffSet_Casque[skin][5]);
			    default: SetPlayerAttachedObject(playerid, 1, 18645, 2, SkinOffSet_Casque[skin][0], SkinOffSet_Casque[skin][1], SkinOffSet_Casque[skin][2], SkinOffSet_Casque[skin][3], SkinOffSet_Casque[skin][4], SkinOffSet_Casque[skin][5]);
			}
		}
		else
		{
		    Ceinture[playerid]=0;
			format(proxy_msg, sizeof(proxy_msg), "%s retire son casque.", playername);
			RemovePlayerAttachedObject(playerid, 1);
		}
		proxy_sendMsg(playerid, proxy_msg);
		return 1;
	}
Reply


Messages In This Thread
[Problem] /Casque Problem - by bobievo - 10.06.2013, 03:58
Re: [Problem] /Casque Problem - by bobievo - 10.06.2013, 16:19

Forum Jump:


Users browsing this thread: 2 Guest(s)