 |
|
 |
|
|
|
Последние Файлы GTA 4 |
Последние Файлы GTA-MP |
Реклама |
|
|
|
|
|
/take помогите с командой.
| |
| Vorobyov | Дата: Понедельник, 20.04.2009, 17:42 | Сообщение # 1 |
|
Постоялец
Группа:
Продвинутые
Сообщений: 310
Награды: 6
Город: Кохтла-Ярве
Репутация: 137
Замечания: 60%
Статус: 
| Приветствую! Как сделать следующее? Например /take [название лицензии] [id игрока/ник] [время в сутках] /take drivinglicense 0 3 Чтобы прибавить время на которое у игрока отнимается лицензия. Готов заплатить!
|
| |
|
|
| Ghost-X | Дата: Понедельник, 20.04.2009, 18:04 | Сообщение # 2 |
|
Мастер джэдай
Группа:
Продвинутые
Сообщений: 3548
Награды: 36
Город: Наб. Челны
Репутация: 856
Замечания: 40%
Статус: 
| Boomber, [pwn]if(strcmp(cmd,"/take",true) == 0) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_BLUE, "/take [название лицензии] [id игрока] [время в сутках] "); return 1; } license = strval(tmp); tmpp = strtok(cmdtext, idx); if(!strlen(tmpp)) { SendClientMessage(playerid, COLOR_BLUE, "/take [название лицензии] [id игрока] [время в сутках] "); return 1; } giveplayerid = strval(tmp); tmppp = strtok(cmdtext, idx); if(!strlen(tmppp)) { SendClientMessage(playerid, COLOR_BLUE, "/take [название лицензии] [id игрока] [время в сутках] "); return 1; } time = strval(tmp); Далее сам, у мну нету твоего кода лицензий }[/pwn]
Спор на форуме, все равно что олимпиада среди умственно отсталых: даже если ты победил, ты все равно гермофродит. Хочешь остаться при своем мнении - держи его при себе.
|
| |
|
|
| Vorobyov | Дата: Понедельник, 25.05.2009, 21:14 | Сообщение # 3 |
|
Постоялец
Группа:
Продвинутые
Сообщений: 310
Награды: 6
Город: Кохтла-Ярве
Репутация: 137
Замечания: 60%
Статус: 
| Поднимаю старую темку. вот мой код лиц. Как сделать?) + будет! [pwn] if(strcmp(cmd, "/take", true) == 0) { if(IsPlayerConnected(playerid)) { if(gTeam[playerid] == 2 || IsACop(playerid)) { if(PlayerInfo[playerid][pRank] < 2) { SendClientMessage(playerid, COLOR_GREY, " Âû äîëæíû èìåòü Ðàíã 2 èëè Âûøå äëÿ ýòîãî äåéñòâèÿ !"); return 1; } new x_nr[256]; x_nr = strtok(cmdtext, idx); if(!strlen(x_nr)) { SendClientMessage(playerid, COLOR_WHITE, "|______________________Ëèøåíèå ______________________|"); SendClientMessage(playerid, COLOR_WHITE, " Èñïîëüçóé: /take [Íàçâàíèå] [id èãðîêà/íèê èãðîêà]"); SendClientMessage(playerid, COLOR_GREY, " Âîçìîæíûå ëèöåíçèè: Driverslicense, Flyinglicense, Boatlicense, Gunlicense, Weapons, Drugs, Materials"); SendClientMessage(playerid, COLOR_WHITE, "|___________________________________________________|"); return 1; } if(strcmp(x_nr,"driverslicense",true) == 0) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, " Èñïîëüçóé: /take driverslicense [id èãðîêà/íèê èãðîêà]"); return 1; } giveplayerid = ReturnUser(tmp); if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if (ProxDetectorS(8.0, playerid, giveplayerid)) { format(string, sizeof(string), "* Âû îòíÿëè ïðàâà ó èãðîêà %s!", giveplayer); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* Ïîëèöåéñêèé %s îòíÿë ó âàñ ïðàâà íà óïðàâëåíèå àâòîìîáèëåì.", sendername); SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string); PlayerInfo[giveplayerid][pCarLic] = 0; } else { SendClientMessage(playerid, COLOR_GREY, " Ýòîò èãðîê äàëåêî îò âàñ!"); return 1; } } } else { SendClientMessage(playerid, COLOR_GREY, " Ýòîãî èãðîêà íåò íà ñåðâåðå!"); return 1; } } else if(strcmp(x_nr,"flyinglicense",true) == 0) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, " Èñïîëüçóé: /take flyinglicense [id èãðîêà/íèê èãðîêà]"); return 1; } giveplayerid = ReturnUser(tmp); if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if (ProxDetectorS(8.0, playerid, giveplayerid)) { format(string, sizeof(string), "* Âû ëèøèëè %s Ëèöåíçèè Ëåò÷èêà.", giveplayer); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* Ïîëèöåéñêèé %s ëèøèë âàñ Ëèöåíçèè Ëåò÷èêà.", sendername); SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string); PlayerInfo[giveplayerid][pFlyLic] = 0; } else { SendClientMessage(playerid, COLOR_GREY, " Ýòîò èãðîê íå âîçëå Âàñ !"); return 1; } } } else { SendClientMessage(playerid, COLOR_GREY, " Ýòîãî èãðîêà íåòó íà ñåðâåðå !"); return 1; } } else if(strcmp(x_nr,"gunlicense",true) == 0) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, " Èñïîëüçóé: /take driverslicense [id èãðîêà/íèê èãðîêà]"); return 1; } giveplayerid = ReturnUser(tmp); if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if (ProxDetectorS(8.0, playerid, giveplayerid)) { format(string, sizeof(string), "* .Âû ëèøèëè %s Ëèöåíçèè íà Îðóæèå.", giveplayer); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* Ïîëèöåéñêèé %s ëèøèë âàñ Ëèöåíçèè íà Îðóæèå.", sendername); SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string); PlayerInfo[giveplayerid][pGunLic] = 0; } else { SendClientMessage(playerid, COLOR_GREY, " Ýòîò èãðîê íå âîçëå Âàñ !"); return 1; } } } else { SendClientMessage(playerid, COLOR_GREY, " Ýòîãî èãðîêà íåòó íà ñåðâåðå !"); return 1; } } else if(strcmp(x_nr,"boatlicense",true) == 0) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, " Èñïîëüçóé: /take boatlicense [id èãðîêà/íèê èãðîêà]"); return 1; } giveplayerid = ReturnUser(tmp); if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if (ProxDetectorS(8.0, playerid, giveplayerid)) { format(string, sizeof(string), "* Âû ëèøèëè %s Ëèöåíçèè íà Ëîäêó.", giveplayer); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* Ïîëèöåéñêèé %s ëèøèë âàñ Ëèöåíçèè íà Ëîäêó.", sendername); SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string); PlayerInfo[giveplayerid][pBoatLic] = 0; } else { SendClientMessage(playerid, COLOR_GREY, " Ýòîò èãðîê íå âîçëå Âàñ !"); return 1; } } } else { SendClientMessage(playerid, COLOR_GREY, " Ýòîãî èãðîêà íåòó íà ñåðâåðå !"); return 1; } } else if(strcmp(x_nr,"weapons",true) == 0) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, " Èñïîëüçóé: /take weapons [id èãðîêà/íèê èãðîêà]"); return 1; } giveplayerid = ReturnUser(tmp); if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if (ProxDetectorS(8.0, playerid, giveplayerid)) { format(string, sizeof(string), "* Âû êîíôèñêîâàëè ó %s's Îðóæèå.", giveplayer); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* Îôèöåð %s êîíôèñêîâàë âàøå Îðóæèå.", sendername); SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string); ResetPlayerWeapons(giveplayerid); PlayerInfo[giveplayerid][pGun1] = 0; PlayerInfo[giveplayerid][pAmmo1] = 0; PlayerInfo[giveplayerid][pGun2] = 0; PlayerInfo[giveplayerid][pAmmo2] = 0; PlayerInfo[giveplayerid][pGun3] = 0; PlayerInfo[giveplayerid][pAmmo3] = 0; PlayerInfo[giveplayerid][pGun4] = 0; PlayerInfo[giveplayerid][pAmmo4] = 0; } else { SendClientMessage(playerid, COLOR_GREY, " Ýòîò èãðîê íå âîçëå Âàñ !"); return 1; } } } else { SendClientMessage(playerid, COLOR_GREY, " Ýòîãî èãðîêà íåòó íà ñåðâåðå !"); return 1; } } else if(strcmp(x_nr,"drugs",true) == 0) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, " Èñïîëüçóé: /take drugs [id èãðîêà/íèê èãðîêà]"); return 1; } giveplayerid = ReturnUser(tmp); if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if (ProxDetectorS(8.0, playerid, giveplayerid)) { format(string, sizeof(string), "* Âû êîíôèñêîâàëè ó %s's Íàðêîòèêè.", giveplayer); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* Îôèöåð %s êîíôèñêîâàë ó âàñ Íàðêîòèêè.", sendername); SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string); PlayerInfo[giveplayerid][pDrugs] = 0; } else { SendClientMessage(playerid, COLOR_GREY, " Ýòîò èãðîê íå âîçëå Âàñ !"); return 1; } } } else { SendClientMessage(playerid, COLOR_GREY, " Ýòîãî èãðîêà íåòó íà ñåðâåðå !"); return 1; } } else if(strcmp(x_nr,"materials",true) == 0) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, " Èñïîëüçóé: /take materials [id èãðîêà/íèê èãðîêà]"); return 1; } giveplayerid = ReturnUser(tmp); if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if (ProxDetectorS(8.0, playerid, giveplayerid)) { format(string, sizeof(string), "* Âû êîíôèñêîâàëè ó %s's Ìàòåðèàëû.", giveplayer); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* Îôèöåð %s êîíôèñêîâàë ó âàñ Ìàòåðèàëû.", sendername); SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string); PlayerInfo[giveplayerid][pMats] = 0; } else { SendClientMessage(playerid, COLOR_GREY, " Ýòîò èãðîê íå âîçëå Âàñ !"); return 1; } } } else { SendClientMessage(playerid, COLOR_GREY, " Ýòîãî èãðîêà íåòó íà ñåðâåðå !"); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " Íåòó òàêîãî Èìåíè !"); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " Âû íå Ïîëèöåéñêèé !"); return 1; } } return 1; }[/pwn]
|
| |
|
|
| Eakwarp | Дата: Понедельник, 25.05.2009, 21:16 | Сообщение # 4 |
|
Мастер джэдай
Группа:
Продвинутые
Сообщений: 4874
Награды: 179
Город: Москва
Репутация: 2543
Замечания: 60%
Статус: 
| Boomber, тебе пример дали, делай сам, применяй логику и мозг.
More than 4 years of development, more than 250,000 lines of source code, more than a hundred units and more than 3400 revisions. Valakas Roleplay - choose your role.
Valakas Roleplay on Twitter
Платные консультации, разработка, в ICQ. Дорого.
|
| |
|
|
| ZirkiN | Дата: Вторник, 26.05.2009, 01:33 | Сообщение # 5 |
|
Постоялец
Группа:
Продвинутые
Сообщений: 326
Награды: 15
Город: Новосибирск
Репутация: 144
Замечания: 0%
Статус: 
| Quote (Eakwarp) Boomber, тебе пример дали, делай сам, применяй логику и мозг. Ты хоть на этот пример смотрел:? Там нету того, что просит Boomber. Boomber, Во-первых либо меняй кодировку, либо будь добр перед копированием открывать код через блокнот, чтобы не было кракозябр. Вот примерно так делается забирание лицензии на время: Вверх к глобальным переменным: new ooop=0; команда: [pwn]if(strcmp(cmd, "/take", true) == 0) { if(IsPlayerConnected(playerid)) { if(gTeam[playerid] == 2 || IsACop(playerid)) { if(PlayerInfo[playerid][pRank] < 2) { SendClientMessage(playerid, COLOR_GREY, " A^u^ a"i^e"?i'u^ e`i`a*o`u" ?a`i'a~ 2 e`e"e` A^u^?a* a"e"y" y'o`i^a~i^ a"a*e'n~o`a^e`y" !"); return 1; } new x_nr[256]; x_nr = strtok(cmdtext, idx); if(!strlen(x_nr)) { SendClientMessage(playerid, COLOR_WHITE, "|______________________E"e`?a*i'e`a* ______________________|"); SendClientMessage(playerid, COLOR_WHITE, " E`n~i"i^e"u"c,o'e': /take [I'a`c,a^a`i'e`a*] [id e`a~?i^e^a`/i'e`e^ e`a~?i^e^a`]"); SendClientMessage(playerid, COLOR_GREY, " A^i^c,i`i^?i'u^a* e"e`o"a*i'c,e`e`: Driverslicense, Flyinglicense, Boatlicense, Gunlicense, Weapons, Drugs, Materials"); SendClientMessage(playerid, COLOR_WHITE, "|___________________________________________________|"); return 1; } if(strcmp(x_nr,"driverslicense",true) == 0) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, " E`n~i"i^e"u"c,o'e': /take driverslicense [id e`a~?i^e^a`/i'e`e^ e`a~?i^e^a`]"); return 1; } giveplayerid = ReturnUser(tmp); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, " Пишите /take driverslicense [id или часть ника] [время в сутках]"); return 1; } if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if (ProxDetectorS(8.0, playerid, giveplayerid)) { format(string, sizeof(string), "* A^u^ i^o`i'y"e"e` i"?a`a^a` o' e`a~?i^e^a` %s!", giveplayer); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* I"i^e"e`o"a*e'n~e^e`e' %s i^o`i'y"e" o' a^a`n~ i"?a`a^a` i'a` o'i"?a`a^e"a*i'e`a* a`a^o`i^i`i^a'e`e"a*i`.", sendername); SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string); //PlayerInfo[giveplayerid][pCarLic] = 0; PlayerInfo[giveplayerid][pCarLic] = -strval(tmp); } else { SendClientMessage(playerid, COLOR_GREY, " Y'o`i^o` e`a~?i^e^ a"a`e"a*e^i^ i^o` a^a`n~!"); return 1; } } } else { SendClientMessage(playerid, COLOR_GREY, " Y'o`i^a~i^ e`a~?i^e^a` i'a*o` i'a` n~a*?a^a*?a*!"); return 1; } } else if(strcmp(x_nr,"flyinglicense",true) == 0) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, " E`n~i"i^e"u"c,o'e': /take flyinglicense [id e`a~?i^e^a`/i'e`e^ e`a~?i^e^a`]"); return 1; } giveplayerid = ReturnUser(tmp); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, " Пишите /take flyinglicense [id или часть ника] [время в сутках]"); return 1; } if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if (ProxDetectorS(8.0, playerid, giveplayerid)) { format(string, sizeof(string), "* A^u^ e"e`?e`e"e` %s E"e`o"a*i'c,e`e` E"a*o`?e`e^a`.", giveplayer); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* I"i^e"e`o"a*e'n~e^e`e' %s e"e`?e`e" a^a`n~ E"e`o"a*i'c,e`e` E"a*o`?e`e^a`.", sendername); SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string); PlayerInfo[giveplayerid][pFlyLic] = -strval(tmp); } else { SendClientMessage(playerid, COLOR_GREY, " Y'o`i^o` e`a~?i^e^ i'a* a^i^c,e"a* A^a`n~ !"); return 1; } } } else { SendClientMessage(playerid, COLOR_GREY, " Y'o`i^a~i^ e`a~?i^e^a` i'a*o`o' i'a` n~a*?a^a*?a* !"); return 1; } } else if(strcmp(x_nr,"gunlicense",true) == 0) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, " E`n~i"i^e"u"c,o'e': /take driverslicense [id e`a~?i^e^a`/i'e`e^ e`a~?i^e^a`]"); return 1; } giveplayerid = ReturnUser(tmp); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, " Пишите /take gunlicense [id или часть ника] [время в сутках]"); return 1; } if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if (ProxDetectorS(8.0, playerid, giveplayerid)) { format(string, sizeof(string), "* .A^u^ e"e`?e`e"e` %s E"e`o"a*i'c,e`e` i'a` I^?o'?e`a*.", giveplayer); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* I"i^e"e`o"a*e'n~e^e`e' %s e"e`?e`e" a^a`n~ E"e`o"a*i'c,e`e` i'a` I^?o'?e`a*.", sendername); SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string); PlayerInfo[giveplayerid][pGunLic] = -strval(tmp); } else { SendClientMessage(playerid, COLOR_GREY, " Y'o`i^o` e`a~?i^e^ i'a* a^i^c,e"a* A^a`n~ !"); return 1; } } } else { SendClientMessage(playerid, COLOR_GREY, " Y'o`i^a~i^ e`a~?i^e^a` i'a*o`o' i'a` n~a*?a^a*?a* !"); return 1; } } else if(strcmp(x_nr,"boatlicense",true) == 0) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, " E`n~i"i^e"u"c,o'e': /take boatlicense [id e`a~?i^e^a`/i'e`e^ e`a~?i^e^a`]"); return 1; } giveplayerid = ReturnUser(tmp); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, " Пишите /take boatlicense [id или часть ника] [время в сутках]"); return 1; } if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if (ProxDetectorS(8.0, playerid, giveplayerid)) { format(string, sizeof(string), "* A^u^ e"e`?e`e"e` %s E"e`o"a*i'c,e`e` i'a` E"i^a"e^o'.", giveplayer); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* I"i^e"e`o"a*e'n~e^e`e' %s e"e`?e`e" a^a`n~ E"e`o"a*i'c,e`e` i'a` E"i^a"e^o'.", sendername); SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string); PlayerInfo[giveplayerid][pBoatLic] = -strval(tmp); } else { SendClientMessage(playerid, COLOR_GREY, " Y'o`i^o` e`a~?i^e^ i'a* a^i^c,e"a* A^a`n~ !"); return 1; } } } else { SendClientMessage(playerid, COLOR_GREY, " Y'o`i^a~i^ e`a~?i^e^a` i'a*o`o' i'a` n~a*?a^a*?a* !"); return 1; } } else if(strcmp(x_nr,"weapons",true) == 0) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, " E`n~i"i^e"u"c,o'e': /take weapons [id e`a~?i^e^a`/i'e`e^ e`a~?i^e^a`]"); return 1; } giveplayerid = ReturnUser(tmp); if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if (ProxDetectorS(8.0, playerid, giveplayerid)) { format(string, sizeof(string), "* A^u^ e^i^i'o^e`n~e^i^a^a`e"e` o' %s's I^?o'?e`a*.", giveplayer); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* I^o^e`o"a*? %s e^i^i'o^e`n~e^i^a^a`e" a^a`?a* I^?o'?e`a*.", sendername); SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string); ResetPlayerWeapons(giveplayerid); PlayerInfo[giveplayerid][pGun1] = 0; PlayerInfo[giveplayerid][pAmmo1] = 0; PlayerInfo[giveplayerid][pGun2] = 0; PlayerInfo[giveplayerid][pAmmo2] = 0; PlayerInfo[giveplayerid][pGun3] = 0; PlayerInfo[giveplayerid][pAmmo3] = 0; PlayerInfo[giveplayerid][pGun4] = 0; PlayerInfo[giveplayerid][pAmmo4] = 0; } else { SendClientMessage(playerid, COLOR_GREY, " Y'o`i^o` e`a~?i^e^ i'a* a^i^c,e"a* A^a`n~ !"); return 1; } } } else { SendClientMessage(playerid, COLOR_GREY, " Y'o`i^a~i^ e`a~?i^e^a` i'a*o`o' i'a` n~a*?a^a*?a* !"); return 1; } } else if(strcmp(x_nr,"drugs",true) == 0) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, " E`n~i"i^e"u"c,o'e': /take drugs [id e`a~?i^e^a`/i'e`e^ e`a~?i^e^a`]"); return 1; } giveplayerid = ReturnUser(tmp); if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if (ProxDetectorS(8.0, playerid, giveplayerid)) { format(string, sizeof(string), "* A^u^ e^i^i'o^e`n~e^i^a^a`e"e` o' %s's I'a`?e^i^o`e`e^e`.", giveplayer); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* I^o^e`o"a*? %s e^i^i'o^e`n~e^i^a^a`e" o' a^a`n~ I'a`?e^i^o`e`e^e`.", sendername); SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string); PlayerInfo[giveplayerid][pDrugs] = 0; } else { SendClientMessage(playerid, COLOR_GREY, " Y'o`i^o` e`a~?i^e^ i'a* a^i^c,e"a* A^a`n~ !"); return 1; } } } else { SendClientMessage(playerid, COLOR_GREY, " Y'o`i^a~i^ e`a~?i^e^a` i'a*o`o' i'a` n~a*?a^a*?a* !"); return 1; } } else if(strcmp(x_nr,"materials",true) == 0) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, " E`n~i"i^e"u"c,o'e': /take materials [id e`a~?i^e^a`/i'e`e^ e`a~?i^e^a`]"); return 1; } giveplayerid = ReturnUser(tmp); if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if (ProxDetectorS(8.0, playerid, giveplayerid)) { format(string, sizeof(string), "* A^u^ e^i^i'o^e`n~e^i^a^a`e"e` o' %s's I`a`o`a*?e`a`e"u^.", giveplayer); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* I^o^e`o"a*? %s e^i^i'o^e`n~e^i^a^a`e" o' a^a`n~ I`a`o`a*?e`a`e"u^.", sendername); SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string); PlayerInfo[giveplayerid][pMats] = 0; } else { SendClientMessage(playerid, COLOR_GREY, " Y'o`i^o` e`a~?i^e^ i'a* a^i^c,e"a* A^a`n~ !"); return 1; } } } else { SendClientMessage(playerid, COLOR_GREY, " Y'o`i^a~i^ e`a~?i^e^a` i'a*o`o' i'a` n~a*?a^a*?a* !"); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " I'a*o`o' o`a`e^i^a~i^ E`i`a*i'e` !"); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " A^u^ i'a* I"i^e"e`o"a*e'n~e^e`e' !"); return 1; } } return 1; }[/pwn] И например в SetPlayerUnjail (если этот не подходит то создай отдельную функцию с таймером на 1000ms) [pwn]( ooop < 1 ) ? (ooop = 60*24-1) : ( ooop--); // можно задавать не с помощью флага, и например через увеличенное время таймера (сделано под SetPlayerUnjail) if(ooop == 0){ for(new i = 0; i < MAX_PLAYERS; i++){ if(PlayerInfo[i][pCarLic] == -1){ /*Чтобы избежать спонтанной выдачи лицензии тому кто ее еще не получал*/ PlayerInfo[i][pCarLic] = 1; } else if(PlayerInfo[i][pCarLic] < 0){ /*-1 обработается вверху, а сюда придут все ост. отриц значения*/ PlayerInfo[i][pCarLic]++; } if(PlayerInfo[i][pFlyLic] == -1){ PlayerInfo[i][pFlyLic] = 1; } else if(PlayerInfo[i][pFlyLic] < 0){ PlayerInfo[i][pFlyLic]++; } if(PlayerInfo[i][pGunLic] == -1){ PlayerInfo[i][pGunLic] = 1; } else if(PlayerInfo[i][pGunLic] < 0){ PlayerInfo[i][pGunLic]++; } if(PlayerInfo[i][pBoatLic] == -1){ PlayerInfo[i][pBoatLic] = 1; } else if(PlayerInfo[i][pBoatLic] < 0){ PlayerInfo[i][pBoatLic]++; } } }[/pwn] p.s.Если не совсем работает или совсем не работает, то в аську, т.к. писал в блокноте и не проверял.
all:GMCC ~2% current:GMCC.C.L0 ~49%
Сообщение отредактировал ZirkiN - Вторник, 26.05.2009, 03:35 |
| |
|
|
|
 |
|
 | |
| |
|