ma keresgetem a hivatalos forumon és találtam egy wc scriptet gondoltam lefordítom
Készitõ:wumpyc
Eredeti link:
http://forum.sa-mp.com/showthread.php?t=291961&highlightMagyarosítota: N@rbirock
#include \"a_samp\"
#include \"zcmd\"
#include <fixchars.h>
#define COLOR_YELLOW 0xFFFF00FF
#define COLOR_GREEN 0x00FF00FF
#define COLOR_RED 0xFF0000FF
#define COLOR_BLUE 0x0000FFFF
new TimeToPee[MAX_PLAYERS];
new toilettimer;
new toilettimer2;
new peeing;
public OnPlayerConnect(playerid)
{
toilettimer = SetTimerEx(\"toilettime\",180000,false,\"%d\",playerid);
return 1;
}
forward toilettime(playerid);
public toilettime(playerid)
{
SendClientMessage(playerid,COLOR_BLUE,\"WC-zned kell /pee ...van 20 másodperced\");
toilettimer2 = SetTimerEx(\"toilettime2\",20000,false,\"%d\",playerid);
TimeToPee[playerid] = 1;
return 1;
}
forward toilettime2(playerid);
public toilettime2(playerid)
{
if (IsPlayerInAnyVehicle(playerid) == 1)
{
RemovePlayerFromVehicle(playerid);
SetPlayerSpecialAction(playerid, 68);
TogglePlayerControllable(playerid, 0);
SendClientMessage(playerid,COLOR_RED,\"Pisilsz\");
peeing = SetTimerEx(\"pee\",10000,false,\"%d\",playerid);
toilettimer = SetTimerEx(\"toilettime\",180000,false,\"%d\",playerid);
TimeToPee[playerid] = 0;
}else{
SetPlayerSpecialAction(playerid, 68);
TogglePlayerControllable(playerid, 0);
peeing = SetTimerEx(\"pee\",10000,false,\"%d\",playerid);
toilettimer = SetTimerEx(\"toilettime\",180000,false,\"%d\",playerid);
SendClientMessage(playerid,COLOR_RED,\"Pisilsz\");
TimeToPee[playerid] = 0;
}
return 1;
}
forward pee(playerid);
public pee(playerid)
{
SendClientMessage(playerid,COLOR_BLUE,\"Készen vagy\");
TogglePlayerControllable(playerid, 1);
return 1;
}
COMMAND:pee(playerid,params[])
{
if (TimeToPee[playerid] == 1)
{
SetPlayerSpecialAction(playerid, 68);
toilettimer = SetTimerEx(\"toilettime\",180000,false,\"%d\",playerid);
peeing = SetTimerEx(\"pee\",10000,false,\"%d\",playerid);
TimeToPee[playerid] = 0;
}else{
SendClientMessage(playerid,COLOR_RED,\"Nem kell WC-zned\");
}
return 1;
}
public OnPlayerDisconnect(playerid)
{
KillTimer(toilettimer);
KillTimer(toilettimer2);
KillTimer(peeing);
}