Ronni Posted June 1, 2023 Report Posted June 1, 2023 Salutare am o comanda sa intru la party in vw 1, si vreau ca playerii sa nu abuzeze de aceasta comanda si sa poata folosi comanda asta la un anumit nr. de minute.Un ajutor pls? } YCMD:enterparty(playerid, params[], help) { if(PlayerInfo[playerid][pAdmin] < 0) return SCM(playerid, COLOR_WHITE, AdminOnly); if(GetPlayerState(playerid) == 2) SetVehiclePosEx(playerid, GetPlayerVehicleID(playerid), 241.5090,-1821.7465,13.3); else SetPlayerPosEx(false, playerid, 241.5090,-1821.7465,13.3); SetPlayerInterior(playerid,0); InHQ[playerid] = -1; InHouse[playerid] = -1; InBussines[playerid] = -1; SetPlayerVirtualWorld(playerid,1); return true; } Quote
0 Sancky Posted June 1, 2023 Report Posted June 1, 2023 (edited) te folosesti de gettime() care returneaza unix timestamp-ul. static playerCommandDelay[MAX_PLAYERS]; //global scope YCMD:enterparty(playerid, params[], help) { if(PlayerInfo[playerid][pAdmin] < 0) return SCM(playerid, COLOR_WHITE, AdminOnly); if(gettime() - playerCommandDelay[playerid] < (5 * 60)) return 1; if(GetPlayerState(playerid) == 2) SetVehiclePosEx(playerid, GetPlayerVehicleID(playerid), 241.5090,-1821.7465,13.3); else SetPlayerPosEx(false, playerid, 241.5090,-1821.7465,13.3); SetPlayerInterior(playerid,0); InHQ[playerid] = -1; InHouse[playerid] = -1; InBussines[playerid] = -1; SetPlayerVirtualWorld(playerid,1); playerCommandDelay[playerid] = gettime(); return true; } Edited June 2, 2023 by Sancky Quote
Question
Ronni
Salutare am o comanda sa intru la party in vw 1, si vreau ca playerii sa nu abuzeze de aceasta comanda si sa poata folosi comanda asta la un anumit nr. de minute.Un ajutor pls?
}
YCMD:enterparty(playerid, params[], help) {
if(PlayerInfo[playerid][pAdmin] < 0) return SCM(playerid, COLOR_WHITE, AdminOnly);
if(GetPlayerState(playerid) == 2) SetVehiclePosEx(playerid, GetPlayerVehicleID(playerid), 241.5090,-1821.7465,13.3);
else SetPlayerPosEx(false, playerid, 241.5090,-1821.7465,13.3);
SetPlayerInterior(playerid,0);
InHQ[playerid] = -1;
InHouse[playerid] = -1;
InBussines[playerid] = -1;
SetPlayerVirtualWorld(playerid,1);
return true;
}
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.