18.06.2017, 21:22
PHP код:
new Bandana[MAX_PLAYERS];
CMD:bandana(playerid)
{
SetPlayerAttachedObject(playerid, 0, 18912, 2, 0.078534, 0.041857, -0.001727, 268.970458, 1.533374, 269.223754);
SendClientMessage(playerid, -1, " » Para remover a bandana use: /rb");
Bandana[playerid] = 1;
return 1;
}
CMD:bandana2(playerid)
{
SetPlayerAttachedObject(playerid, 0, 18913, 2, 0.078534, 0.041857, -0.001727, 268.970458, 1.533374, 269.223754);
SendClientMessage(playerid, -1, " » Para remover a bandana use: /rb");
Bandana[playerid] = 2;
return 1;
}
CMD:bandana3(playerid)
{
SetPlayerAttachedObject(playerid, 0, 18914, 2, 0.078534, 0.041857, -0.001727, 268.970458, 1.533374, 269.223754);
SendClientMessage(playerid, -1, " » Para remover a bandana use: /rb");
Bandana[playerid] = 3;
return 1;
}
CMD:bandana4(playerid)
{
SetPlayerAttachedObject(playerid, 0, 18915, 2, 0.078534, 0.041857, -0.001727, 268.970458, 1.533374, 269.223754);
SendClientMessage(playerid, -1, " » Para remover a bandana use: /rb");
Bandana[playerid] = 4;
return 1;
}
CMD:bandana5(playerid)
{
SetPlayerAttachedObject(playerid, 0, 18916, 2, 0.078534, 0.041857, -0.001727, 268.970458, 1.533374, 269.223754);
SendClientMessage(playerid, -1, " » Para remover a bandana use: /rb");
Bandana[playerid] = 5;
return 1;
}
CMD:bandana6(playerid)
{
SetPlayerAttachedObject(playerid, 0, 18917, 2, 0.078534, 0.041857, -0.001727, 268.970458, 1.533374, 269.223754);
SendClientMessage(playerid, -1, " » Para remover a bandana use: /rb");
Bandana[playerid] = 6;
return 1;
}
CMD:bandana7(playerid)
{
SetPlayerAttachedObject(playerid, 0, 18918, 2, 0.078534, 0.041857, -0.001727, 268.970458, 1.533374, 269.223754);
SendClientMessage(playerid, -1, " » Para remover a bandana use: /rb");
Bandana[playerid] = 7;
return 1;
}
CMD:bandana8(playerid)
{
SetPlayerAttachedObject(playerid, 0, 18919, 2, 0.078534, 0.041857, -0.001727, 268.970458, 1.533374, 269.223754);
SendClientMessage(playerid, -1, " » Para remover a bandana use: /rb");
Bandana[playerid] = 8;
return 1;
}
CMD:bandana9(playerid)
{
SetPlayerAttachedObject(playerid, 0, 18920, 2, 0.078534, 0.041857, -0.001727, 268.970458, 1.533374, 269.223754);
SendClientMessage(playerid, -1, " » Para remover a bandana use: /rb");
Bandana[playerid] = 9;
return 1;
}
CMD:rb(playerid)
{
RemovePlayerAttachedObject(playerid, 0);
SendClientMessage(playerid, -1, "» Vocк removeu a bandana");
Bandana[playerid] = 0;
return 1;
}
PHP код:
// OnPlayerSpawn
switch(Bandana[playerid])
{
case 0: return 1;
case 1: cmd_bandana(playerid);
case 2: cmd_bandada2(playerid);
case 3: cmd_bandada3(playerid);
case 4: cmd_bandada4(playerid);
case 5: cmd_bandada5(playerid);
case 6: cmd_bandada6(playerid);
case 7: cmd_bandada7(playerid);
case 8: cmd_bandada8(playerid);
case 9: cmd_bandada9(playerid);
return 1;
}