-
xD van olyan hogy STRCMP na én abba kérném.
A Windows-hoz az is kéne, hogy a Windows 8 már csak level 2 admintól lehessen szval 2 vagy nagyobb. Teljes sript #include #define ilyen sorok is.
A lényeg hogyha A player 2 vagy nagyobb admin akkor ezt írja ki: Átváltottál Windows 8 -ra.
és ha beírná a parancsot hogy /Winversion akkor kiírná neki a Windows versiont pl a Win 7 mindegyikkel meg tudnátok ezt nekem oldani?
És aki segít a nevét feltüntetem a Windows mode szerkesztõi között + megkapja a modeot is a nagy semmiért (segítségért) Ingyen.
-
public OnPlayerCommandText(playerid, cmdtext[])
{
new bool: win8[MAX_PLAYERS];
if(strcmp(cmdtext, \"/windows8\", true) == 0)
{
if(ADMINVÁLTOZÓDIDEMÁSOLDBE >= 2)
{
SendClientMessage(playerid, -1, \"Átváltottál Windows 8-ra!\");
win8[playerid] = true;
}
return 1;
}
if(strcmp(cmdtext, \"/winversion\", true) == 0)
{
if(win8[playerid] == true)
{
SendClientMessage(playerid, -1, \"Windows verziód: Win 8\");
} else {
SendClientMessage(playerid, -1, \"Windows verziód: Win 7\");
}
return 1;
}
return 0;
}
Tessék, nem teszteltem, ha nem így gondoltad akkor szólj.
-
public OnPlayerCommandText(playerid, cmdtext[])
{
new bool: win8[MAX_PLAYERS];
if(strcmp(cmdtext, \"/windows8\", true) == 0)
{
if(ADMINVÁLTOZÓDIDEMÁSOLDBE >= 2)
{
SendClientMessage(playerid, -1, \"Átváltottál Windows 8-ra!\");
win8[playerid] = true;
}
return 1;
}
if(strcmp(cmdtext, \"/winversion\", true) == 0)
{
if(win8[playerid] == true)
{
SendClientMessage(playerid, -1, \"Windows verziód: Win 8\");
} else {
SendClientMessage(playerid, -1, \"Windows verziód: Win 7\");
}
return 1;
}
return 0;
}
Tessék, nem teszteltem, ha nem így gondoltad akkor szólj.
xD XP Vista 95 98 NT server és stb verzuiót is megírnád?
-
Igen, holnapra megcsinálom.
-
Köszikeee-
-
public OnPlayerCommandText(playerid, cmdtext[])
{
new bool: win8[MAX_PLAYERS];
new bool: win7[MAX_PLAYERS];
new bool: winvista[MAX_PLAYERS];
new bool: winxp[MAX_PLAYERS];
new bool: win98[MAX_PLAYERS];
new bool: win95[MAX_PLAYERS];
new bool: winnxt[MAX_PLAYERS];
if(strcmp(cmdtext, \"/windows8\", true) == 0)
{
if(ADMINVÁLTOZÓDIDEMÁSOLDBE >= 2)
{
SendClientMessage(playerid, -1, \"Átváltottál Windows 8-ra!\");
win8[playerid] = true;
}
return 1;
}
if(strcmp(cmdtext, \"/windows7\", true) == 0)
{
if(ADMINVÁLTOZÓDIDEMÁSOLDBE >= 2)
{
SendClientMessage(playerid, -1, \"Átváltottál Windows 7-re!\");
win7[playerid] = true;
}
return 1;
}
if(strcmp(cmdtext, \"/windowsvista\", true) == 0)
{
if(ADMINVÁLTOZÓDIDEMÁSOLDBE >= 2)
{
SendClientMessage(playerid, -1, \"Átváltottál Windows Vista-ra!\");
winvista[playerid] = true;
}
return 1;
}
if(strcmp(cmdtext, \"/windowsxp\", true) == 0)
{
if(ADMINVÁLTOZÓDIDEMÁSOLDBE >= 2)
{
SendClientMessage(playerid, -1, \"Átváltottál Windows XP-re!\");
winxp[playerid] = true;
}
return 1;
}
if(strcmp(cmdtext, \"/windows98\", true) == 0)
{
if(ADMINVÁLTOZÓDIDEMÁSOLDBE >= 2)
{
SendClientMessage(playerid, -1, \"Átváltottál Windows 98-ra!\");
win98[playerid] = true;
}
if(strcmp(cmdtext, \"/windows95\", true) == 0)
{
if(ADMINVÁLTOZÓDIDEMÁSOLDBE >= 2)
{
SendClientMessage(playerid, -1, \"Átváltottál Windows 95-re!\");
win95[playerid] = true;
}
return 1;
}
if(strcmp(cmdtext, \"/windowsnxt\", true) == 0)
{
if(ADMINVÁLTOZÓDIDEMÁSOLDBE >= 2)
{
SendClientMessage(playerid, -1, \"Átváltottál Windows NXT-re!\");
winnxt[playerid] = true;
}
return 1;
}
if(strcmp(cmdtext, \"/winversion\", true) == 0)
{
if(win8[playerid] == true)
{
SendClientMessage(playerid, -1, \"Windows verziód: Win 8\");
}
else if(win7[playerid] == true)
{
SendClientMessage(playerid, -1, \"Windows verziód: Win 7\");
}
else if(winvista[playerid] == true)
{
SendClientMessage(playerid, -1, \"Windows verziód: Win Vista\");
}
else if(winxp[playerid] == true)
{
SendClientMessage(playerid, -1, \"Windows verziód: Win XP\");
}
else if(win98[playerid] == true)
{
SendClientMessage(playerid, -1, \"Windows verziód: Win 98\");
}
else if(win95[playerid] == true)
{
SendClientMessage(playerid, -1, \"Windows verziód: Win 95\");
}
else if(winnxt[playerid] == true)
{
SendClientMessage(playerid, -1, \"Windows verziód: Win NXT\");
}
return 1;
}
return 0;
}
A pawno nem ír rá hibát, de nem teszteltem élesben.
UI.: Bocsi a sorok elcsúszásáért.
-
s ha csak a Win8 adminos? A többi playeres.
Megcsinálod?
-
public OnPlayerCommandText(playerid, cmdtext[])
{
new bool: win8[MAX_PLAYERS];
new bool: win7[MAX_PLAYERS];
new bool: winvista[MAX_PLAYERS];
new bool: winxp[MAX_PLAYERS];
new bool: win98[MAX_PLAYERS];
new bool: win95[MAX_PLAYERS];
new bool: winnxt[MAX_PLAYERS];
if(strcmp(cmdtext, \"/windows8\", true) == 0)
{
if(ADMINVÁLTOZÓDIDEMÁSOLDBE >= 2)
{
SendClientMessage(playerid, -1, \"Átváltottál Windows 8-ra!\");
win8[playerid] = true;
}
return 1;
}
if(strcmp(cmdtext, \"/windows7\", true) == 0)
{
SendClientMessage(playerid, -1, \"Átváltottál Windows 7-re!\");
win7[playerid] = true;
return 1;
}
if(strcmp(cmdtext, \"/windowsvista\", true) == 0)
{
SendClientMessage(playerid, -1, \"Átváltottál Windows Vista-ra!\");
winvista[playerid] = true;
return 1;
}
if(strcmp(cmdtext, \"/windowsxp\", true) == 0)
{
SendClientMessage(playerid, -1, \"Átváltottál Windows XP-re!\");
winxp[playerid] = true;
return 1;
}
if(strcmp(cmdtext, \"/windows98\", true) == 0)
{
SendClientMessage(playerid, -1, \"Átváltottál Windows 98-ra!\");
win98[playerid] = true;
return 1;
}
if(strcmp(cmdtext, \"/windows95\", true) == 0)
{
SendClientMessage(playerid, -1, \"Átváltottál Windows 95-re!\");
win95[playerid] = true;
return 1;
}
if(strcmp(cmdtext, \"/windowsnxt\", true) == 0)
{
SendClientMessage(playerid, -1, \"Átváltottál Windows NXT-re!\");
winnxt[playerid] = true;
return 1;
}
if(strcmp(cmdtext, \"/winversion\", true) == 0)
{
if(win8[playerid] == true)
{
SendClientMessage(playerid, -1, \"Windows verziód: Win 8\");
}
else if(win7[playerid] == true)
{
SendClientMessage(playerid, -1, \"Windows verziód: Win 7\");
}
else if(winvista[playerid] == true)
{
SendClientMessage(playerid, -1, \"Windows verziód: Win Vista\");
}
else if(winxp[playerid] == true)
{
SendClientMessage(playerid, -1, \"Windows verziód: Win XP\");
}
else if(win98[playerid] == true)
{
SendClientMessage(playerid, -1, \"Windows verziód: Win 98\");
}
else if(win95[playerid] == true)
{
SendClientMessage(playerid, -1, \"Windows verziód: Win 95\");
}
else if(winnxt[playerid] == true)
{
SendClientMessage(playerid, -1, \"Windows verziód: Win NXT\");
}
return 1;
}
return 0;
}