31.08.2011, 03:09
I've having some problems. My skin isn't saving after a GMX restart. I've tried like everything. Can someone assist me via Teamviewer? Please send me a message. Thank you
I got 2 requests.
First is dropgun FS. I know 2 dropgun FS'es which don't work. I can't /pickitem in them. (Modified the command) So i would like to get a dropgun FS, with /dropgun, OnPlayerDeath and /pickitem. And i want the guns be MODELS, not unrealistic shitty pickups, hehe. Second is, how to get Intelexe's Roleplay GM to work? I'm getting 26 errors even i do anything, always the errors. The creatorof it ain't interested of the GM he made, i think :/ Btw. If you know any other GOOD RP gamemode, send me a link |
#define REP_TYPE_GOLD (0)
#define REP_TYPE_SILVER (1)
#define REP_TYPE_BRONZE (2)
#define REP_TYPE_PLATINA (3)
stock GivePlayerReputation(playerid, type = REP_TYPE_BRONZE)
{
new REP_pFile[MAX_PLAYER_NAME+19] = "rep_", File:REP_pFileHnd, REP_repNum, REP_tmpStr[11];
if (!GetPlayerName(playerid, REP_pFile[4], MAX_PLAYER_NAME)) return 0;
strcat(REP_pFile, ".rep"); valstr(REP_tmpStr, type); strcat(REP_pFile, REP_tmpStr);
REP_pFileHnd = fopen(REP_pFile, io_readwrite);
fread(REP_pFileHnd, REP_tmpStr);
REP_repNum = strval(REP_tmpStr);
fclose(REP_pFileHnd);
REP_pFileHnd = fopen(REP_pFile, io_write);
valstr(REP_tmpStr, ++REP_repNum);
fwrite(REP_pFileHnd, REP_tmpStr);
fclose(REP_pFileHnd);
return REP_repNum;
}
stock GetPlayerReputation(playerid, type = REP_TYPE_BRONZE)
{
new REP_pFile[MAX_PLAYER_NAME+19] = "rep_", File:REP_pFileHnd, REP_repNum, REP_tmpStr[11];
if (!GetPlayerName(playerid, REP_pFile[4], MAX_PLAYER_NAME)) return 0;
strcat(REP_pFile, ".rep"); valstr(REP_tmpStr, type); strcat(REP_pFile, REP_tmpStr);
if (!fexist(REP_pFile)) return 0;
REP_pFileHnd = fopen(REP_pFile, io_read);
fread(REP_pFileHnd, REP_tmpStr);
REP_repNum = strval(REP_tmpStr);
fclose(REP_pFileHnd);
return REP_repNum;
}
// example usage with zcmd + sscanf
CMD:giverep(playerid, params[])
{
static gRep_playerid, gRep_reptype, gRep_current, gRep_string[128], gRep_reptypeStr[16], gRep_name[24];
if (sscanf(params, "ui", gRep_playerid, gRep_reptype)) return SendClientMessage(playerid, 0xff0000aa, "* Usage: /giverep [playerid/name] [reputation type]");
if (gRep_reptype < 0 || gRep_reptype > 3) return SendClientMessage(playerid, 0xff0000aa, "* Valid reputation types: 0-3");
if (0 == (gRep_current = GivePlayerReputation(gRep_playerid, gRep_reptype)) ) return SendClientMessage(playerid, 0xff0000aa, "* Error while trying to add to player's reputation.");
switch (gRep_reptype)
{
case REP_TYPE_GOLD: gRep_reptypeStr = "Gold";
case REP_TYPE_SILVER: gRep_reptypeStr = "Silver";
case REP_TYPE_BRONZE: gRep_reptypeStr = "Bronze";
case REP_TYPE_PLATINA: gRep_reptypeStr = "Platina";
}
GetPlayerName(gRep_playerid, gRep_name, 24);
format(gRep_string, 128, "* You have added to %s's %s reputation! Player's current %s reputation: %d",
gRep_name, gRep_reptypeStr, gRep_reptypeStr, gRep_current);
SendClientMessage(playerid, -1, gRep_string);
GetPlayerName(playerid, gRep_name, 24);
format(gRep_string, 128, "* %s's added to your %s reputation! Your current %s reputation: %d",
gRep_name, gRep_reptypeStr, gRep_reptypeStr, gRep_current);
return 1;
}
GetWeekDay()
{
new
WeekDay[20];
switch(((gettime()+334800)/86400-(gettime()+334800)/86400/7*7))
{
case 0:return 1;
case 1:return 2;
case 2:return 3;
case 3:return 4;
case 4:return 5;
case 5:return 6;
case 6:return 7;
}
return -1;
}