Salvacore
29.05.2014, 01:28
http://www.mafiaparadise.0fees.net/ss/sa-mp-034.png
http://www.mafiaparadise.0fees.net/ss/sa-mp-036.png
В начало мода.
new
ShoeTies[MAX_PLAYERS],
shoetie_timer[MAX_PLAYERS]
;
В OnPlayerDisconnect.
KillTimer(shoetie_timer[playerid]);
В OnPlayerConnect.
shoetie_timer[playerid] = SetTimerEx("Shoeties", 600000, 1, "i", playerid);
В OnPlayerSpawn.
ShoeTies[playerid] = 1;
В OnPlayerKeyStateChange.
if(!IsPlayerInAnyVehicle(playerid)){
if ((newkeys & KEY_JUMP) && !(oldkeys & KEY_JUMP) || (newkeys & KEY_SPRINT) && !(oldkeys & KEY_SPRINT)){
if(ShoeTies[playerid] == 0){
ApplyAnimation(playerid, "GYMNASIUM", "gym_jog_falloff",4.1,0,1,1,0,0);
ApplyAnimation(playerid, "GYMNASIUM", "gym_jog_falloff",4.1,0,1,1,0,0);
SendClientMessage(playerid,-1,"У вас развязаны шнурки, завяжите их (( /tieshoes ))");
}
}
}
Ко всем командам.
if (strcmp("/tieshoes", cmdtext, true, 10) == 0){
if(ShoeTies[playerid] == 0){
ShoeTies[playerid] = 1;
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
SendClientMessage(playerid,-1,"Вы завязали шнурки!");
GameTextForPlayer(playerid,"~g~Shoes tied",3000,3);
return 1;
}
if(ShoeTies[playerid] == 1){
ShoeTies[playerid] = 0;
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
SendClientMessage(playerid,-1,"Вы развязали шнурки!");
GameTextForPlayer(playerid,"~r~Shoes untied",3000,3);
}
return 1;
}
CMD:tieshoes(playerid, params[]){
if(ShoeTies[playerid] == 0){
ShoeTies[playerid] = 1;
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
SendClientMessage(playerid,COLOR_YELLOW,"You have tied your shoes.");
GameTextForPlayer(playerid,"~g~Shoes tied",3000,3);
return 1;
}
if(ShoeTies[playerid] == 1){
ShoeTies[playerid] = 0;
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
SendClientMessage(playerid,COLOR_YELLOW,"You have untied your shoes.");
GameTextForPlayer(playerid,"~r~Shoes untied",3000,3);
}
return 1;
}
ALTX:tieshoes("/шнурки");
В конец мода.
forward Shoeties(playerid);
public Shoeties(playerid){
if(ShoeTies[playerid] == 1){
new
RandomTie
;
RandomTie = random(100);
switch(RandomTie){
case 0..4: ShoeTies[playerid] = 0;
}
}
return 1;
}
Автор: WardenCS
Перевод и доработка статьи: Salvador (http://pro-pawn.ru/member.php?801-Salvador)
Специально для: Pro-Pawn.Ru (http://pro-pawn.ru)
http://www.mafiaparadise.0fees.net/ss/sa-mp-036.png
В начало мода.
new
ShoeTies[MAX_PLAYERS],
shoetie_timer[MAX_PLAYERS]
;
В OnPlayerDisconnect.
KillTimer(shoetie_timer[playerid]);
В OnPlayerConnect.
shoetie_timer[playerid] = SetTimerEx("Shoeties", 600000, 1, "i", playerid);
В OnPlayerSpawn.
ShoeTies[playerid] = 1;
В OnPlayerKeyStateChange.
if(!IsPlayerInAnyVehicle(playerid)){
if ((newkeys & KEY_JUMP) && !(oldkeys & KEY_JUMP) || (newkeys & KEY_SPRINT) && !(oldkeys & KEY_SPRINT)){
if(ShoeTies[playerid] == 0){
ApplyAnimation(playerid, "GYMNASIUM", "gym_jog_falloff",4.1,0,1,1,0,0);
ApplyAnimation(playerid, "GYMNASIUM", "gym_jog_falloff",4.1,0,1,1,0,0);
SendClientMessage(playerid,-1,"У вас развязаны шнурки, завяжите их (( /tieshoes ))");
}
}
}
Ко всем командам.
if (strcmp("/tieshoes", cmdtext, true, 10) == 0){
if(ShoeTies[playerid] == 0){
ShoeTies[playerid] = 1;
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
SendClientMessage(playerid,-1,"Вы завязали шнурки!");
GameTextForPlayer(playerid,"~g~Shoes tied",3000,3);
return 1;
}
if(ShoeTies[playerid] == 1){
ShoeTies[playerid] = 0;
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
SendClientMessage(playerid,-1,"Вы развязали шнурки!");
GameTextForPlayer(playerid,"~r~Shoes untied",3000,3);
}
return 1;
}
CMD:tieshoes(playerid, params[]){
if(ShoeTies[playerid] == 0){
ShoeTies[playerid] = 1;
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
SendClientMessage(playerid,COLOR_YELLOW,"You have tied your shoes.");
GameTextForPlayer(playerid,"~g~Shoes tied",3000,3);
return 1;
}
if(ShoeTies[playerid] == 1){
ShoeTies[playerid] = 0;
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
SendClientMessage(playerid,COLOR_YELLOW,"You have untied your shoes.");
GameTextForPlayer(playerid,"~r~Shoes untied",3000,3);
}
return 1;
}
ALTX:tieshoes("/шнурки");
В конец мода.
forward Shoeties(playerid);
public Shoeties(playerid){
if(ShoeTies[playerid] == 1){
new
RandomTie
;
RandomTie = random(100);
switch(RandomTie){
case 0..4: ShoeTies[playerid] = 0;
}
}
return 1;
}
Автор: WardenCS
Перевод и доработка статьи: Salvador (http://pro-pawn.ru/member.php?801-Salvador)
Специально для: Pro-Pawn.Ru (http://pro-pawn.ru)