Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Briefcase System
- if(strcmp(cmd, "/briefcase", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pBCase] == 1)
- {
- if(BCase[playerid] == 0)
- {
- SetPlayerHoldingObject(playerid, 1210, 6,0.3,0.1,0,0,-90,0); // BriefCase
- SendClientMessage(playerid, COLOR_WHITE, " You have pulled out your briefcase. ");
- BCase[playerid] = 1;
- return 1;
- }
- else if(BCase[playerid] == 1)
- {
- StopPlayerHoldingObject(playerid);
- SendClientMessage(playerid, COLOR_WHITE, " You have put away your briefcase. ");
- BCase[playerid] = 0;
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, " You don't own a briefcase !");
- return 1;
- }
- return 1;
- }
- return 1;
- Small Whisper System
- if(strcmp(cmd, "/whisper", true) == 0 || strcmp(cmd, "/w", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(gPlayerLogged[playerid] == 0)
- {
- SendClientMessage(playerid, COLOR_GREY, " You havent logged in yet !");
- return 1;
- }
- new str[160];
- GetPlayerName(playerid, str, MAX_PLAYER_NAME);
- for (new i = 0; i < MAX_PLAYER_NAME; i++)
- if (str[i] == '_')
- str[i] = ' ';
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[64];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- result[idx - offset] = EOS;
- if(!strlen(result))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /(w)isper [whispering text]");
- return 1;
- }
- format(str, sizeof(str), "%s whispers: %s", str, result);
- ProxDetector(2.0, playerid, str,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- printf("%s", str);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement