if (realchat) { if(gPlayerLogged[playerid] == 0) { return 0; } GetPlayerName(playerid, sendername, sizeof(sendername)); if(!IsPlayerInAnyVehicle(playerid)) { if(PlayerInfo[playerid][pMaskuse] == 1) { format(string, sizeof(string), "Mask_12302 Says: %s", text); ApplyAnimation(playerid, "PED", "IDLE_chat", 4.1, 0, 1, 1, 0, 3000); ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); } else { format(string, sizeof(string), "%s Says: %s", sendername, text); ApplyAnimation(playerid, "PED", "IDLE_chat", 4.1, 0, 1, 1, 0, 3000); ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); } } else { new carid = GetPlayerVehicleID(playerid); new pveh = GetVehicleModel(GetPlayerVehicleID(playerid)); if(IsABike(carid) || IsAOBike(carid) || IsAPizzabike(carid) || IsAPlane(carid) || IsABoat(carid) || IsASweeper(carid) || IsAHarvest(carid) || IsADrugHarvest(carid) || IsATank(carid) || pveh == 523 || pveh == 480 || pveh == 567 || pveh == 533 || pveh == 555 || pveh == 539 || pveh == 572 || pveh == 571 || pveh == 530 || pveh == 457 || pveh == 575 || pveh == 536 || pveh == 424) { if(PlayerInfo[playerid][pMaskuse] == 1) { format(string, sizeof(string), "Mask_12302 Says: %s", text); ApplyAnimation(playerid, "PED", "IDLE_chat", 4.1, 0, 1, 1, 0, 3000); ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); } else { format(string, sizeof(string), "%s Says: %s", sendername, text); ApplyAnimation(playerid, "PED", "IDLE_chat", 4.1, 0, 1, 1, 0, 3000); ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); } } else { if(VehicleWindows[GetPlayerVehicleID(playerid)] == 0) { if(PlayerInfo[playerid][pMaskuse] == 1) { format(string, sizeof(string), "(Windows Shut) Stranger Says: %s", text); ApplyAnimation(playerid, "PED", "IDLE_chat", 4.1, 0, 1, 1, 0, 3000); ProxDetector(10.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); } else { format(string, sizeof(string), "(Windows Shut) %s Says: %s", sendername, text); ApplyAnimation(playerid, "PED", "IDLE_chat", 4.1, 0, 1, 1, 0, 3000); ProxDetector(10.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); } } else { if(PlayerInfo[playerid][pMaskuse] == 1) { format(string, sizeof(string), "(Windows Open) Mask_12302 Says: %s", text); ApplyAnimation(playerid, "PED", "IDLE_chat", 4.1, 0, 1, 1, 0, 3000); ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); } else { format(string, sizeof(string), "(Windows Open) %s Says: %s", sendername, text); ApplyAnimation(playerid, "PED", "IDLE_chat", 4.1, 0, 1, 1, 0, 3000); ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); } } } } return 0; } return 1; }
if (realchat) { if(gPlayerLogged[playerid] == 0) { return 0; } GetPlayerName(playerid, sendername, sizeof(sendername)); if(!IsPlayerInAnyVehicle(playerid)) { if(PlayerInfo[playerid][pMaskuse] == 1) { format(string, sizeof(string), "Mask_12302 Says: %s", text); ApplyAnimation(playerid, "PED", "IDLE_chat", 4.1, 0, 1, 1, 0,3000); SetTimerEx("StopTalk",floatround(strlen(text)/9)*1000, 0, "i", playerid); ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); } else { format(string, sizeof(string), "%s Says: %s", sendername, text); ApplyAnimation(playerid, "PED", "IDLE_chat", 4.1, 0, 1, 1, 0, 3000); SetTimerEx("StopTalk",floatround(strlen(text)/9)*1000, 0, "i", playerid); ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); } } else { new carid = GetPlayerVehicleID(playerid); new pveh = GetVehicleModel(GetPlayerVehicleID(playerid)); if(IsABike(carid) || IsAOBike(carid) || IsAPizzabike(carid) || IsAPlane(carid) || IsABoat(carid) || IsASweeper(carid) || IsAHarvest(carid) || IsADrugHarvest(carid) || IsATank(carid) || pveh == 523 || pveh == 480 || pveh == 567 || pveh == 533 || pveh == 555 || pveh == 539 || pveh == 572 || pveh == 571 || pveh == 530 || pveh == 457 || pveh == 575 || pveh == 536 || pveh == 424) { if(PlayerInfo[playerid][pMaskuse] == 1) { format(string, sizeof(string), "Mask_12302 Says: %s", text); ApplyAnimation(playerid, "PED", "IDLE_chat", 4.1, 0, 1, 1, 0, 3000); SetTimerEx("StopTalk",floatround(strlen(text)/9)*1000, 0, "i", playerid); ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); } else { format(string, sizeof(string), "%s Says: %s", sendername, text); ApplyAnimation(playerid, "PED", "IDLE_chat", 4.1, 0, 1, 1, 0, 3000); SetTimerEx("StopTalk",floatround(strlen(text)/9)*1000, 0, "i", playerid); ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); } } else { if(VehicleWindows[GetPlayerVehicleID(playerid)] == 0) { if(PlayerInfo[playerid][pMaskuse] == 1) { format(string, sizeof(string), "(Windows Shut) Stranger Says: %s", text); ApplyAnimation(playerid, "PED", "IDLE_chat", 4.1, 0, 1, 1, 0, 3000); SetTimerEx("StopTalk",floatround(strlen(text)/9)*1000, 0, "i", playerid); ProxDetector(10.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); } else { format(string, sizeof(string), "(Windows Shut) %s Says: %s", sendername, text); ApplyAnimation(playerid, "PED", "IDLE_chat", 4.1, 0, 1, 1, 0, 3000); SetTimerEx("StopTalk",floatround(strlen(text)/9)*1000, 0, "i", playerid); ProxDetector(10.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); } } else { if(PlayerInfo[playerid][pMaskuse] == 1) { format(string, sizeof(string), "(Windows Open) Mask_12302 Says: %s", text); ApplyAnimation(playerid, "PED", "IDLE_chat", 4.1, 0, 1, 1, 0, 0); SetTimerEx("StopTalk",floatround(strlen(text)/9)*1000, 0, "i", playerid); ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); } else { format(string, sizeof(string), "(Windows Open) %s Says: %s", sendername, text); ApplyAnimation(playerid, "PED", "IDLE_chat", 4.1, 0, 1, 1, 0, 0); SetTimerEx("StopTalk",floatround(strlen(text)/9)*1000, 0, "i", playerid); ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); } } } } return 0; } return 1; }
forward anim(playerid);
public OnPlayerText(playerid, text[])
{
if (strfind(text, "yo") != -1)
{
ApplyAnimation(playerid, "PED", "IDLE_chat", 4.1, 0, 1, 1, 0,3000);
SetTimerEx("anim", 2000, false, "i", playerid); //THANKS FOR DON CORRELI FOR THIS SETTIMEREX!
}
return 1;
public anim(playerid)
{
ClearAnimations(playerid);
return 1;
}
Originally Posted by patchkinson
pawn Код:
|
Originally Posted by Don Correlli
Quote:
|
Originally Posted by patchkinson
can you please correct my SetTimerEx ?
|
SetTimerEx("anim", 2000, false, "i", playerid);
Originally Posted by Don Correlli
Quote:
pawn Код:
|
Originally Posted by patchkinson
hehe thanks for correcting me. you helped me and him, im going to put your settimerex in my example but give you credits for it, if you dont want me to put it in my example, please tell me!
|
Originally Posted by Don Correlli
Quote:
|