CMD:shake(playerid, params[])
{
new stilus, id;
if(sscanf(params, \"ud\", id, stilus))
{
SendClientMessage(playerid,ZOLD, \"Használat: /shakehand [playerid] [1-9]\");
}
else
{
if(IsPlayerConnected(id))
{
if(!ProxDetectorS(1.5, playerid,id)) SendClientMessage(playerid,VPIROS,\"*Nem vagy közel a játékoshoz\");
else {
if(stilus >= 1 && stilus < 10)
{
jatekos[id][shakeAjanlasStilus] = stilus;
jatekos[id][shakeAjanlas] = playerid;
SendFormattedMessage(playerid,SZOLD, \"*Kezet szeretnél fogni %s-val/vel.\",GetRPName(id));
SendFormattedMessage(id,SZOLD, \"*%s kezet szeretne fogni veled. /accept shake\",GetRPName(playerid));
} else {
SendClientMessage(playerid,ZOLD, \"Használat: /shake [playerid] [1-9]\");
}
}
} else {
SendClientMessage(playerid,VPIROS, \"*A játékos nincs fennt a szerveren.\");
}
}
return 1;
}
/accept-nél:
else if(strcmp(alparancs, \"shake\",true)==0)
{
//new id;
if(jatekos[playerid][shakeAjanlas] != -1)
{
if(!ProxDetectorS(1.5, playerid,jatekos[playerid][shakeAjanlas])) SendClientMessage(playerid,VPIROS,\"*Nem vagy közel a játékoshoz\");
else {
switch(jatekos[playerid][shakeAjanlasStilus])
{
case 1:
{
SzemtolSzemben(playerid, jatekos[playerid][shakeAjanlas]);
ApplyPlayerAnimation(playerid, \"GANGS\", \"hndshkaa\", 4.0, 1, 1, 1, 0, 1000);
ApplyPlayerAnimation(jatekos[playerid][shakeAjanlas], \"GANGS\", \"hndshkaa\", 4.0, 1, 1, 1, 0, 1000);
jatekos[playerid][shakeAjanlas] = -1;
}
case 2:
{
SzemtolSzemben(playerid, jatekos[playerid][shakeAjanlas]);
ApplyPlayerAnimation(playerid, \"GANGS\", \"hndshkba\", 4.0, 1, 1, 1, 0, 1000);
ApplyPlayerAnimation(jatekos[playerid][shakeAjanlas], \"GANGS\", \"hndshkba\", 4.0, 1, 1, 1, 0, 1000);
jatekos[playerid][shakeAjanlas] = -1;
}
case 3:
{
SzemtolSzemben(playerid, jatekos[playerid][shakeAjanlas]);
ApplyPlayerAnimation(playerid, \"GANGS\", \"hndshkca\", 4.0, 1, 1, 1, 0, 1000);
ApplyPlayerAnimation(jatekos[playerid][shakeAjanlas], \"GANGS\", \"hndshkca\", 4.0, 1, 1, 1, 0, 1000);
jatekos[playerid][shakeAjanlas] = -1;
}
case 4:
{
SzemtolSzemben(playerid, jatekos[playerid][shakeAjanlas]);
ApplyPlayerAnimation(playerid, \"GANGS\", \"hndshkcb\", 4.0, 1, 1, 1, 0, 1000);
ApplyPlayerAnimation(jatekos[playerid][shakeAjanlas], \"GANGS\", \"hndshkcb\", 4.0, 1, 1, 1, 0, 1000);
jatekos[playerid][shakeAjanlas] = -1;
}
case 5:
{
SzemtolSzemben(playerid, jatekos[playerid][shakeAjanlas]);
ApplyPlayerAnimation(playerid, \"GANGS\", \"hndshkda\", 4.0, 1, 1, 1, 0, 1000);
ApplyPlayerAnimation(jatekos[playerid][shakeAjanlas], \"GANGS\", \"hndshkda\", 4.0, 1, 1, 1, 0, 1000);
jatekos[playerid][shakeAjanlas] = -1;
}
case 6:
{
SzemtolSzemben(playerid, jatekos[playerid][shakeAjanlas]);
ApplyPlayerAnimation(playerid, \"GANGS\", \"hndshkea\", 4.0, 1, 1, 1, 0, 1000);
ApplyPlayerAnimation(jatekos[playerid][shakeAjanlas], \"GANGS\", \"hndshkea\", 4.0, 1, 1, 1, 0, 1000);
jatekos[playerid][shakeAjanlas] = -1;
}
case 7:
{
SzemtolSzemben(playerid, jatekos[playerid][shakeAjanlas]);
ApplyPlayerAnimation(playerid, \"GANGS\", \"hndshkfa\", 4.0, 1, 1, 1, 0, 1000);
ApplyPlayerAnimation(jatekos[playerid][shakeAjanlas], \"GANGS\", \"hndshkfa\", 4.0, 1, 1, 1, 0, 1000);
jatekos[playerid][shakeAjanlas] = -1;
}
case 8:
{
SzemtolSzemben(playerid, jatekos[playerid][shakeAjanlas]);
ApplyPlayerAnimation(playerid, \"GANGS\", \"hndshkfa_swt\", 4.0, 1, 1, 1, 0, 1000);
ApplyPlayerAnimation(jatekos[playerid][shakeAjanlas], \"GANGS\", \"hndshkfa_swt\", 4.0, 1, 1, 1, 0, 1000);
jatekos[playerid][shakeAjanlas] = -1;
}
case 9:
{
SzemtolSzemben(playerid, jatekos[playerid][shakeAjanlas]);
ApplyPlayerAnimation(playerid, \"GANGS\", \"prtial_hndshk_01\", 4.0, 1, 1, 1, 0, 1000);
ApplyPlayerAnimation(jatekos[playerid][shakeAjanlas], \"GANGS\", \"prtial_hndshk_01\", 4.0, 1, 1, 1, 0, 1000);
jatekos[playerid][shakeAjanlas] = -1;
}
}
}
} else {
SendClientMessage(playerid,VPIROS, \"*Nem akar veled senki sem kezet fogni.\");
}
}
forcesync Set to 1 to force playerid to sync animation with other players in all instances (optional).[/quote]